Espaços nominais
Variantes
Acções

delete expression

Da cppreference.com
< cpp‎ | language

 
 
Linguagem C++
Tópicos gerais
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Controle de fluxo
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Declarações execução condicional
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Instruções de iteração
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ir declarações
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declaração da função
lambda declaração da função
modelo de função
linha especificador
especificações de exceção (obsoleta)
noexcept especificador (C++11)
Exceções
Original:
Exceptions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Namespaces
Original:
Namespaces
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
decltype specifier (C++11)
Especificadores
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv especificadores
armazenamento duração especificadores
constexpr especificador (C++11)
auto especificador (C++11)
alignas especificador (C++11)
Inicialização
Original:
Initialization
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Literais
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressões
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
representações alternativas
Utilitários
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
tipo de alias declaração (C++11)
atributos (C++11)
Conversões
Original:
Casts
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
conversões implícitas
const_cast conversion
static_cast conversion
dynamic_cast conversion
reinterpret_cast conversion
Elenco C-estilo e funcional
Alocação de memória
Original:
Memory allocation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
delete expression
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Classe propriedades específicas de função
Original:
Class-specific function properties
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funções membro especiais
Original:
Special member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modelos
Original:
Templates
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
modelo de classe
modelo de função
especialização de modelo
pacotes de parâmetros (C++11)
Diversos
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Assembly embutido
 
e lançamentos obtidos área de memória
Original:
Destructs object(s) previously allocated by the
The text has been machine-translated via Google Translate.
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.
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.
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.
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.

[editar] Palavras-chave

delete