Espaços nominais
Variantes
Acções

<div class="t-tr-text">operador<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">operator</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> delete<div class="t-tr-text">, Operador<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">, operator</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> delete[]

Da cppreference.com
< cpp‎ | memory‎ | new

 
 
Biblioteca de utilitários
Digite apoio (basic types, RTTI, type traits)
Gerenciamento de memória dinâmica
De tratamento de erros
Utilidades do programa
Variadic funções
Data e hora
Objetos de função
initializer_list(C++11)
bitset
hash(C++11)
Os operadores relacionais
Original:
Relational operators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
Pares e tuplas
Original:
Pairs and tuples
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pair
tuple(C++11)
piecewise_construct_t(C++11)
piecewise_construct(C++11)
Troque, avançar e avançar
Original:
Swap, forward and move
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap
forward(C++11)
move(C++11)
move_if_noexcept(C++11)
declval(C++11)
 
Gerenciamento de memória dinâmica
Gerenciamento de memória de baixo nível
Alocadores
Original:
Allocators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
allocator
allocator_traits(C++11)
allocator_arg_t(C++11)
allocator_arg(C++11)
uses_allocator(C++11)
scoped_allocator_adaptor(C++11)
Uninitialized armazenamento
Original:
Uninitialized storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
uninitialized_copy
uninitialized_copy_n(C++11)
uninitialized_fill
uninitialized_fill_n
raw_storage_iterator
get_temporary_buffer
return_temporary_buffer
Ponteiros inteligentes
Original:
Smart pointers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unique_ptr(C++11)
shared_ptr(C++11)
weak_ptr(C++11)
auto_ptr(obsoleta)
owner_less(C++11)
enable_shared_from_this(C++11)
bad_weak_ptr(C++11)
default_delete(C++11)
Apoio a coleta de lixo
Original:
Garbage collection support
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
declare_reachable(C++11)
undeclare_reachable(C++11)
declare_no_pointers(C++11)
undeclare_no_pointers(C++11)
pointer_safety(C++11)
get_pointer_safety(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.
pointer_traits(C++11)
addressof(C++11)
align(C++11)
C Library
Original:
C Library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Gerenciamento de memória de baixo nível
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.
operator new
operator new[]
operator delete
operator delete[]
get_new_handler(C++11)
set_new_handler
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.
bad_alloc
bad_array_new_length(C++11)
nothrow_t
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.
new_handler
Objetos
Original:
Objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
nothrow
 
Defined in header <new>
void operator delete  ( void* ptr );
(1)
void operator delete[]( void* ptr );
(2)
void operator delete  ( void* ptr, const std::nothrow_t& );
(3)
void operator delete[]( void* ptr, const std::nothrow_t& );
(4)
void operator delete  ( void* ptr, void*);
(5)
void operator delete[]( void* ptr, void* );
(6)
Desaloca armazenamento. Estas funções de alocação são chamados por excluir-expressões desalocar memória depois destruindo objetos dinâmicos.
Original:
Deallocates storage. These allocation functions are called by excluir-expressões to deallocate memory after destructing dynamic objects.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Desaloca armazenamento, obtido por uma chamada para operator new(size_t) ou operator new(size_t, std::nothrow_t)
Original:
Deallocates storage, obtained by a call to operator new(size_t) or operator new(size_t, std::nothrow_t)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Desaloca armazenamento, obtido por uma chamada para operator new[](size_t) ou operator new[](size_t, std::nothrow_t)
Original:
Deallocates storage, obtained by a call to operator new[](size_t) or operator new[](size_t, std::nothrow_t)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3-4)
Mesmo que 1-2), a menos que substituído. Essas versões são chamados por não arremesso novas expressões-se um construtor que eles chamam lança uma exceção.
Original:
Same as 1-2) unless replaced. These versions are called by non-throwing new-expressions if a constructor they call throws an exception.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5-6)
Não fazer nada. Essas versões são chamados por expressões nova colocação se um construtor que eles chamam lança uma exceção.
Original:
Do nothing. These versions are called by placement new expressions if a constructor they call throws an exception.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Em todos os casos, se ptr é um ponteiro nulo, a função não faz nada.. desalocação
Original:
In all cases, if ptr is a null pointer, the deallocation function does nothing.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Substituindo e sobrecarga

As versões 1-4) são implicitamente declarado em cada unidade de tradução, mesmo se o cabeçalho <new> não está incluído. Estas funções são' substituível: a fornecida pelo usuário função não-membro com a mesma assinatura substitui a versão implícita. No máximo, uma substituição pode ser fornecida para cada uma das quatro funções desalocação implícitos. Além disso, o programa pode definir versões de membro de classe destas funções ou definir funções de alocação com assinaturas diferentes (exceto 5-6) não são substituíveis).
Original:
The versions 1-4) are implicitly declared in each translation unit even if the <new> header is not included. These functions are replaceable: a user-provided non-member function with the same signature replaces the implicit version. At most one replacement may be provided for each of the four implicit deallocation functions. Also, program can define class member versions of these functions or define allocation functions with different signatures (except 5-6) are not replaceable).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A função de desalocação pode ser substituído / sobrecarregado de duas formas:
Original:
The deallocation function can be replaced/overloaded in two ways:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
'No escopo global': a fim de chamá-lo, a assinatura das funções de alocação sobrecarregadas deve ser visível no local de desalocação, exceto para as funções de desalocação declaradas implicitamente padrão. Esta função de distribuição irá ser utilizado para todos desalocações com os parâmetros correspondentes do programa actual
Original:
in the global scope: in order to call it, the signature of the overloaded allocation functions must be visible at the place of deallocation, except for implicitly declared default deallocation functions. This allocation function will be used for all deallocations with corresponding parameters in the current program
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
'No âmbito local': o operator delete sobrecarregado deve ser função de membro estático público da classe. Esta função desalocação será usado apenas para desalocações dessa classe em particular.
Original:
in the local scope: the overloaded operator delete must be static public member function of the class. This deallocation function will be used only for deallocations of that particular class.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Durante a compilação, cada expressão delete olha-se para o nome da função desalocação apropriado do primeiro lugar no escopo da classe e depois que no âmbito global. Ele pode ser instruído a pular o primeiro passo. Note que, como por sobrecarga regras, quaisquer funções desalocação declaradas no escopo de classe esconde todas as funções desalocação globais. Para mais informações, consulte excluir expressão.
Original:
During compilation, each delete expression looks up for appropriate deallocation function's name firstly in the class scope and after that in the global scope. It can be instructed to skip the first step. Note, that as per sobrecarga regras, any deallocation functions declared in class scope hides all global deallocation functions. For more information see excluir expressão.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Parâmetros

ptr -
ponteiro para uma área de memória para liberar ou um ponteiro nulo
Original:
pointer to a memory area to deallocate or a null pointer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

(Nenhum)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Exceções

noexcept specification:  
noexcept
  (a partir do C++ 11)

[editar] Veja também

[editar] Veja também

funções de alocação
Original:
allocation functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
lançamentos não inicializado armazenamento
Original:
releases uninitialized storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função)
desaloca memória
Original:
deallocates memory
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função)