delete expression
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. |
Oggetto distrugge (s) concesso precedentemente dalla <div class="t-tr-text"> nuova espressione
e rilascia ottenuti area di memoriaOriginal:
new expression
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Original:
Destructs object(s) previously allocated by the
nuova espressione</div> and releases obtained memory area
Original:
new expression
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
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] Sintassi
:: (opzionale) delete expression
|
(1) | ||||||||
:: (opzionale) delete [] expression
|
(2) | ||||||||
[modifica] Spiegazione
Oggetti distrugge, precedentemente costruito espressione
new
e rilascia l'area di memoria ottenuto. Il expression deve trasformarsi in un valore di puntatore che è stato restituito dalla chiamata precedente l'espressione new
. Per singoli oggetti allocati prima versione della espressione deve essere utilizzato, mentre per la seconda versione array deve essere utilizzato. Non c'è espressione delete deallocazione di oggetti inizializzati da posizionamento' nuova funzione deallocazione e distruttore deve essere chiamato in modo esplicito.Original:
Destructs objects, previously constructed by
new
expression and releases the obtained memory area. The expression must result in a pointer value that was returned by previous call to the new
expression. For single allocated objects the first version of the expression must be used, whereas for arrays the second version must be used. There is no delete expression deallocating objects initialized by placement new, deallocation function and destructor must be explicitly called.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.
La memoria viene deallocata da un deallocazione funzione, sia operator delete (per la prima versione della espressione) o operator delete[] (per la seconda versione della espressione).
Original:
The memory is deallocated by an deallocazione funzione, either operator delete (for the first version of the expression) or operator delete[] (for the second version of the expression).
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.
Il nome della funzione di deallocazione è in primo luogo cercato nel locale classe tipo ambito di applicazione e solo se la ricerca ha esito negativo, lo spazio dei nomi globale viene cercato. Se
::
è presente nell'espressione delete
, solo lo spazio dei nomi globale viene cercato. Il prototipo della funzione deve essere simile al seguente:Original:
The deallocation function's name is firstly looked up in the local class type scope and only if the lookup fails, the global namespace is looked up. If
::
is present in the delete
expression, only the global namespace is looked up. The prototype of the function must look like the following: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.
void operator delete (void *ptr); |
for the first version | |
void operator delete[](void *ptr); |
for the second version | |
Entrambe queste funzioni sono implicitamente dichiarate in ogni unità di traduzione. Inoltre, le implementazioni impliciti sono forniti dal compilatore di default, a meno che il programma è implementato in modo esplicito. Vedi questo per ulteriori informazioni.
Original:
Both these functions are implicitly declared in each translation unit. Also, implicit implementations are provided by the compiler by default, unless the program has explicitly implemented them. See questo for more information.
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.