Namespaces
Variants
Views
Actions

std::scoped_allocator_adaptor::destroy

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

 
 
 
 

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

<td>
Defined in header <scoped_allocator>
</td>

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

<tr class="t-dcl ">

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

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

Uses the outer allocator to call the destructor of the object pointed to by p, by calling

std::allocator_traits<OUTERMOST>::destroy(OUTERMOST(*this), p)

where OUTERMOST is the type that would be returned by calling this->outer_allocator(), and then calling the outer_allocator() member function recursively on the result of this call until reaching the type that has no such member function.

Parameters

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

Return value

(none)

See also

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