[#BloombergLP-bslalg-ScalarPrimitives-destruct-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ScalarPrimitives.adoc[ScalarPrimitives]::destruct
:relfileprefix: ../../../
:mrdocs:

Destroy the specified `object` of the parameterized `TARGET&lowbar;TYPE`, as if by calling the `TARGET&lowbar;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 `TARGET&lowbar;TYPE` has the trivial destructor trait&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;scalarprimitives&period;h&gt;`

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

== Description

DEPRECATED&colon; Use `bslma&colon;&colon;DestructionUtil&colon;&colon;destroy` instead&period;


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