[#BloombergLP-bslalg-ArrayDestructionPrimitives-destroy-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayDestructionPrimitives.adoc[ArrayDestructionPrimitives]::destroy
:relfileprefix: ../../../
:mrdocs:

Destroy of the elements in the segment of an array of parameterized `TARGET&lowbar;TYPE` beginning at the specified `begin` address and ending immediately before the specified `end` address&period; If `begin &equals;&equals; 0` and `end &equals;&equals; 0` this function has no effect&period; The behavior is undefined unless either (1) `begin &lt;&equals; end`, `begin !&equals; 0`, and `end !&equals; 0`, or (2) `begin &equals;&equals; 0 &amp;&amp; end &equals;&equals; 0`&period; Note that this method does not deallocate any memory (except memory deallocated by the element destructor calls)&period;

== Synopsis

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

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


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