std::declare_reachable
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <memory>
|
||
| void declare_reachable( void* p ) |
(ya que C + +11) | |
Declara el objeto referenciado por el apuntador
p accesible. Objetos accesibles no serán eliminados por el recolector de basura o que se considera una fuga por un detector de fugas incluso si todos los indicadores de que se destruyan. Un objeto puede ser declarado accesibles en múltiples ocasiones, en cuyo caso varias llamadas a std::undeclare_reachable serían necesarias para eliminar esta característica. Por ejemplo, un XOR lista enlazada necesita declarar a sus nodos alcanzable si la aplicación tiene la recolección de basura habilitada .Original:
Declares the object referenced by the pointer
p reachable. Reachable objects will not be deleted by the garbage collector or considered to be a leak by a leak detector even if all pointers to it are destroyed. An object may be declared reachable multiple times, in which case multiple calls to std::undeclare_reachable would be needed to remove this property. For example, a XOR lista enlazada needs to declare its nodes reachable if the implementation has garbage collection enabled.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Contenido |
[editar] Parámetros
| p | - | un puntero sin peligro derivado de, o un puntero nulo
Original: a safely-derived pointer or a null pointer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[editar] Valor de retorno
(Ninguno)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Excepciones
Puede lanzar std::bad_alloc si el sistema no puede asignar la memoria necesaria para seguir objetos alcanzables .
Original:
May throw std::bad_alloc if the system cannot allocate memory required to track reachable objects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ejemplo
| This section is incomplete Reason: no example |
[editar] Ver también
| (C++11) |
declara que un objeto puede ser reciclado Original: declares that an object can be recycled The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función de plantilla) |