Espacios de nombres
Variantes
Acciones

<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[]

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

 
 
Utilidades de la biblioteca
Escriba apoyo (basic types, RTTI, type traits)
Gestión de memoria dinámica
Gestión de errores
Programa de servicios públicos
Funciones variadic
Fecha y hora
Objetos Function
initializer_list(C++11)
bitset
hash(C++11)
Operadores relacionales
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 y 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)
Cambiar, hacia adelante y mover
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)
 
Gestión de memoria dinámica
Bajo la gestión de memoria de nivel
Los asignadores
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)
Inicializar el almacenamiento
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
Punteros 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(obsoleto)
owner_less(C++11)
enable_shared_from_this(C++11)
bad_weak_ptr(C++11)
default_delete(C++11)
Garbage soporte colección
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)
Varios
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.
 
Bajo la gestión de memoria de nivel
Funciones
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
Clases
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)
Desasigna almacenamiento. Estas funciones de asignación son llamados por Eliminar-expresiones para liberar memoria después destruyendo objetos dinámicos .
Original:
Deallocates storage. These allocation functions are called by Eliminar-expresiones 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)
Desasigna almacenamiento, que se obtiene mediante una llamada a operator new(size_t) o 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)
Desasigna almacenamiento, que se obtiene mediante una llamada a operator new[](size_t) o 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)
Igual 1-2) a menos que sustituye. Estas versiones son llamados por no lanza nuevas expresiones-si un constructor que llaman produce una excepción .
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)
No hacer nada. Estas versiones son llamados por la colocación de nuevas expresiones si un constructor que llaman produce una excepción .
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.
En todos los casos, si ptr es un puntero nulo, la función de cancelación de asignación no hace nada .
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.

Contenido

[editar] Sustitución y sobrecarga

Las versiones 1-4) se declara implícitamente en cada unidad de traducción, incluso si el encabezado <new> no está incluido. Estas funciones son reemplazables': proporcionado por el usuario no miembro de función con la misma firma que sustituye a la versión implícita. A lo sumo una sustitución puede ser proporcionado para cada una de las cuatro funciones de desasignación implícitos. Además, el programa puede definir versiones de miembro de clase de estas funciones o definir funciones de asignación con firmas diferentes (excepto 5-6) no son reemplazables) .
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.
La función de cancelación de la asignación se puede sustituir / sobrecargado de dos maneras:
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.
'En el ámbito global': para llamarlo, la firma de las funciones de asignación sobrecargado debe ser visible en el lugar de desafectación, excepto implícitamente declaradas funciones predeterminadas desasignación. Esta función de asignación se utiliza para todas las cancelaciones de asignación con los parámetros correspondientes en el 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.
'En el ámbito local': el operator delete sobrecargado debe ser miembro público static function de la clase. Esta función desasignación se utilizará sólo para cancelaciones de asignación de esa clase 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 la compilación, cada expresión delete mira el nombre de la función de cancelación de asignación que sean procedentes en primer lugar en el ámbito de la clase y después de que en el ámbito global. Puede ser instruidos para saltarse el primer paso. Tenga en cuenta, que según sobrecarga de reglas, las funciones desasignación declarados en el ámbito de clase oculta todas las funciones desasignación globales. Para obtener más información suprimir la expresión ver .
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 de reglas, any deallocation functions declared in class scope hides all global deallocation functions. For more information see suprimir la expresión.
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 -
puntero a un área de memoria para desasignar o un puntero 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

(Ninguno)
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] Excepciones

noexcept specification:  
noexcept
  (desde C++11)

[editar] Ver también

[editar] Ver también

funciones de asignación
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.

(función) [edit]
versiones sin inicializar el almacenamiento
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.

(función)
desasigna memoria
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.

(función)