[#BloombergLP-bslma-DestructionUtil-destroy]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/DestructionUtil.adoc[DestructionUtil]::destroy
:relfileprefix: ../../../
:mrdocs:

Destroy the specified `object` without deallocating its memory&period;

== Synopsis

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

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

== Description

Destroy the specified `object` of the parameterized `TYPE`, as if by calling the `TYPE` destructor, but do not deallocate the memory occupied by `object`&period; Note that the destructor may deallocate other memory owned by `object`&period; Also note that this function is a no&hyphen;op if the `TYPE` has the trivial destructor trait&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *object*
| address of the object to destroy
|===


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