[#BloombergLP-bslma-ManagedPtrUtil-allocatorDeleter]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/ManagedPtrUtil.adoc[ManagedPtrUtil]::allocatorDeleter
:relfileprefix: ../../../
:mrdocs:

Make use of `AllocatorUtil&colon;&colon;deleteObject` to destroy and deallocate the specified `object` using the specified allocator&period; The behavior is undefined unless `allocator` is an instance of `bslma&colon;&colon;Allocator` that was used to supply memory for `object` and `object` points to an instance of `ELEMENT&lowbar;TYPE` that is within its lifetime&period;

== Synopsis

Declared in `&lt;bslma&lowbar;managedptr&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ELEMENT&lowbar;TYPE&gt;
static
void
allocatorDeleter(
    void* object,
    void* allocator);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
