delete expression
Da 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. |
Destrói objeto (s) anteriormente concedida pela <div class="t-tr-text"> nova expressão
e lançamentos obtidos área de memóriaOriginal:
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
nova expressão</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.
[editar] Sintaxe
:: (opcional) delete expression
|
(1) | ||||||||
:: (opcional) delete [] expression
|
(2) | ||||||||
[editar] Explicação
Objetos destrói, previamente construído pela expressão
new
e libera a área de memória obtido. O expression deve resultar em um valor de ponteiro que foi devolvido pela chamada anterior à expressão new
. Para únicos objetos alocados a primeira versão da expressão deve ser utilizada, enquanto que para matrizes a segunda versão deve ser usada. Não há expressão de exclusão desalocando objetos inicializados pela colocação' novo, função desalocação e destruidor deve ser explicitamente chamado.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.
A memória é desalocado por um função desalocação, quer operator delete (para a primeira versão da expressão) ou operator delete[] (para a segunda versão da expressão).
Original:
The memory is deallocated by an função desalocação, 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.
O nome da função desalocação é em primeiro lugar procurado no local, classe' tipo de escopo e somente se a pesquisa falhar, o espaço global é procurado. Se
::
está presente na expressão delete
, somente o namespace global está olhou para cima. O protótipo da função deve ter a seguinte aparência: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 | |
Ambas as funções são declarados implicitamente em cada unidade de tradução. Além disso, as implementações implícitas são fornecidos pelo compilador por padrão, a menos que o programa foi implementado explicitamente eles. Veja este para mais informações.
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 este 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.