[#bsl-allocator_traits-0ae-destroy] = xref:bsl.adoc[bsl]::xref:bsl/allocator_traits-0ae.adoc[allocator_traits<std::allocator<ALLOCATOR_TYPE>>]::destroy :relfileprefix: ../../ :mrdocs: Destroy an object of type __Tp_ == Synopsis Declared in `<bslma_allocatortraits.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename _Tp> constexpr static void destroy( _Alloc& __a, _Tp* __p) noexcept(_S_nothrow_destroy<_Tp>()); ---- == Description Calls `__a.destroy(__p)` if that expression is well‐formed, otherwise calls `__p‐>~_Tp()` == Parameters [cols="1,4"] |=== | Name| Description | *__a* | An allocator. | *__p* | Pointer to the object to destroy |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#