public static member function
<memory>

std::allocator_traits::destroy

template <class T>
  static void destroy (allocator_type& alloc, T* p);
Destroy object
Destroys the element object pointed by p without deallocating its storage.

In the non-specialized definition of allocator_traits, this member function calls alloc.destroy(p) if such a call is well formed. Otherwise, it invokes p->~T() . A specialization for a specific allocator type may provide a different definition.

Parameters

alloc
Allocator object
allocator_type is an alias of allocator_traits's template parameter.
p
Pointer to an element.

Return value

none

See also