[#BloombergLP-bslma-AllocatorUtil-deleteObject] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/AllocatorUtil.adoc[AllocatorUtil]::deleteObject :relfileprefix: ../../../ :mrdocs: Destroy the object at `p` and deallocate its storage. == Synopsis Declared in `<bslma_allocatorutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_ALLOCATOR, class t_POINTER> static void deleteObject( t_ALLOCATOR const& allocator, t_POINTER p); ---- == Description Destroy the object at the specified `p` address and return the block of memory at `p` to the specified `allocator`. The behavior is undefined unless `p` refers to a fully constructed object allocated from a copy of `allocator` and not yet destroyed or deallocated. == Parameters [cols="1,4"] |=== | Name| Description | *allocator* | allocator to which to return the memory | *p* | address of the fully constructed object to destroy and deallocate |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#