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