std::declare_reachable
Da cppreference.com.
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <memory> | ||
void declare_reachable(void* p ) | (dal C++11) | |
Dichiara l'oggetto a cui fa riferimento il puntatore
p
raggiungibile. Raggiungibile oggetti non verranno eliminati dal garbage collector o considerato come una perdita da un rilevatore di perdite, anche se tutti i puntatori ad esso vengono distrutti. Un oggetto può essere dichiarato raggiungibili più volte, in questo caso più chiamate a std::undeclare_reachable sarebbero necessari per rimuovere questa proprietà. Ad esempio, un XOR lista concatenata deve dichiarare le sue nodi raggiungibile se l'applicazione dispone di garbage collection abilitata.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 concatenata 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.
Indice |
[modifica]Parametri
p | - | un puntatore in modo sicuro, derivato o un puntatore nullo 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. |
[modifica]Valore di ritorno
(Nessuno)
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.
[modifica]Eccezioni
Può lanciare std::bad_alloc se il sistema non è in grado di allocare la memoria necessaria per seguire gli oggetti raggiungibili.
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.
[modifica]Esempio
This section is incomplete Reason: no example |
[modifica]Vedi anche
(C++11) | dichiara che un oggetto può essere riciclato 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. (funzione di modello) |