Namespaces
Variants
Views
Actions

std::allocator::destroy

From cppreference.com
< cpp‎ | memory‎ | allocator
Revision as of 18:05, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <memory>
</td>

<td></td> <td></td> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
void destroy( pointer p );
</td>

<td class="t-dcl-nopad"> </td> <td > (until C++11) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
template< class U >
void destroy( U* p );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Calls the destructor of the object pointed to by p

1) Calls ((T*)p)->~T()
2) Calls p->~U()

Parameters

p - pointer to the object that is going to be destroyed

Return value

(none)

See also

Template:cpp/memory/allocator traits/dcl list destroy