[#BloombergLP-bslma-Allocator-deleteObject-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/Allocator.adoc[Allocator]::deleteObject
:relfileprefix: ../../../
:mrdocs:

`deleteObject` overloads

== Synopses

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

This function has no effect&period; Note that it exists to support calling `deleteObject` will a null pointer literal, that would otherwise not deduce to a pointer type for the method above&period; As calls to `deleteObject` with (typed) null pointer values have well&hyphen;defined behavior, it should also support calls with a null pointer literal&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bslma/Allocator/deleteObject-0a.adoc[deleteObject](xref:bsl/nullptr_t-08.adoc[bsl::nullptr&lowbar;t]);
----

[.small]#xref:BloombergLP/bslma/Allocator/deleteObject-0a.adoc[_» more&period;&period;&period;_]#

Destroy the specified `object` based on its dynamic type and then use this allocator to deallocate its memory footprint&period; Do nothing if `object` is a null pointer&period; The behavior is undefined unless `object`, when cast appropriately to `void &ast;`, was allocated using this allocator and has not already been deallocated&period; Note that `dynamic&lowbar;cast&lt;void &ast;&gt;(object)` is applied if `TYPE` is polymorphic, and `static&lowbar;cast&lt;void &ast;&gt;(object)` is applied otherwise&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
void
xref:BloombergLP/bslma/Allocator/deleteObject-0f.adoc[deleteObject](TYPE const* object);
----

[.small]#xref:BloombergLP/bslma/Allocator/deleteObject-0f.adoc[_» more&period;&period;&period;_]#


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