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

`destruct` overloads

== Synopses

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

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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TARGET&lowbar;TYPE&gt;
static
void
xref:BloombergLP/bslalg/ScalarPrimitives/destruct-00.adoc[destruct](TARGET&lowbar;TYPE* object);
----

[.small]#xref:BloombergLP/bslalg/ScalarPrimitives/destruct-00.adoc[_» more&period;&period;&period;_]#

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; Further note that the specified `allocator` is not used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TARGET&lowbar;TYPE&gt;
static
void
xref:BloombergLP/bslalg/ScalarPrimitives/destruct-05.adoc[destruct](
    TARGET&lowbar;TYPE* object,
    void* allocator);
----

[.small]#xref:BloombergLP/bslalg/ScalarPrimitives/destruct-05.adoc[_» more&period;&period;&period;_]#


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