std::allocator_traits::destroy
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. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <memory>
|
||
template< class T > static void destroy( Alloc& a, T* p ); |
(dal C++11) | |
Calls the destructor of the object pointed to by p. If possible, does so by calling a.destroy(p). If not possible (e.g. a does not have the member function destroy(), then calls the destructor of *p directly, as p->~T().
Parametri
| a | - | allocator to use for destruction |
| p | - | pointer to the object being destroyed |
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.
Note
Because this function provides the automatic fall back to direct call to the destructor, the member function destroy() is an optional Allocator requirement since C++11.
Vedi anche
distrugge un oggetto nella memoria allocata Original: destructs an object in allocated storage The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) | |