Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
Miscellaneous
complex
exception
functional
iterator
limits
locale
memory
new
numeric
stdexcept
typeinfo
utility
valarray
memory
classes:
allocator
auto_ptr
auto_ptr_ref
raw_storage_iterator
functions:
get_temporary_buffer
return_temporary_buffer
uninitialized_copy
uninitialized_fill
uninitialized_fill_n
allocator
allocator::allocator
allocator::~allocator
member functions:
allocator::address
allocator::allocate
allocator::construct
allocator::deallocate
allocator::destroy
allocator::max_size


allocator::destroy

public member function
void destroy (pointer p);

Destroy an object

Destroys the object of type T (the template parameter) pointed by p.

Notice that this does not deallocate space for the element. (see member deallocate to release storage space).

It is equivalent to:
 
((T*)p)->~T();


Parameters

p
Pointer to an object of type T.
In allocator, member type pointer is an alias of T*.

Return value

none

See also