std::declare_reachable
Материал из 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. |
| Заголовочный файл <memory>
|
||
| void declare_reachable( void* p ) |
(начиная с C++11) | |
Объявляет объект, на который ссылается достижима
p указатель. Достижимых объектов не будет удален сборщиком мусора или считать утечку детектор утечки, даже если все указатели на него будут уничтожены. Объект может быть объявлен достижимы несколько раз, и в этом случае несколько вызовов std::undeclare_reachable будет необходима, чтобы удалить эту собственность. Например, XOR связанный список необходимо заявить о своем узлы достижимы, если реализация имеет сборщик мусора включена.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 связанный список 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.
Содержание |
[править] Параметры
| p | - | безопасно, полученных указателем или пустой указатель
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. |
[править] Возвращаемое значение
(Нет)
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.
[править] Исключения
Может бросить std::bad_alloc, если система не может выделить память, необходимую для отслеживания достижимые объекты.
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.
[править] Пример
| Этот раздел не завершён Причина: нет примера |
[править] См. также
| (C++11) |
заявляет, что объект может быть переработан 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. (шаблон функции) |