delete expression
Aus 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. |
<metanoindex/>
Zerstrt sich Objekt (e) zuvor durch den
neuen Ausdruck
und Freisetzungen erhaltenen Speicherbereich zugeordnetOriginal:
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
neuen Ausdruck
and releases obtained memory areaOriginal:
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.
Syntax
::(optional) delete expression
|
(1) | ||||||||
::(optional) delete [] expression
|
(2) | ||||||||
Erklrung
Zerstrt sich Objekte, die zuvor von
new Ausdruck konstruiert und gibt die erhaltene Speicherbereich. Die expression mssen in einem Zeiger Wert, der von vorherigen Aufruf der new Ausdruck zurckgegeben wurde fhren. Fr einzelne zugewiesenen Objekte die erste Version des Ausdrucks muss verwendet werden, whrend fr Arrays die zweite Version benutzt werden muss. Es gibt keine delete Ausdruck Freigeben Objekte Platzierung neu initialisiert, deallocation Funktion und Destruktor explizit aufgerufen werden .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.
Der Speicher wird durch eine deallocation Funktion freigegeben, entweder
operator delete (fr die erste Version der Expression) oder operator delete[] (fr die zweite Version des Ausdrucks) .Original:
The memory is deallocated by an deallocation Funktion, 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.
Die deallocation Funktion wird der Name zunchst in der lokalen Klasse type Rahmen sah und nur wenn das fehlschlgt, die globale Namespace blickte auf. Wenn
<tbody>
</tbody>:: in der delete Ausdruck ist, wird nur die globalen Namensraum blickte auf. Der Prototyp der Funktion muss wie folgt aussehen: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 | |
Beide Funktionen sind implizit in jeder bersetzungseinheit erklrt. Auerdem sind impliziten Implementierungen vom Compiler standardmig vorgesehen, es sei denn, das Programm hat sie ausdrcklich umgesetzt. Siehe dies fr weitere Informationen .
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 dies 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.