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

Destroy each instance of `TARGET&lowbar;TYPE` in the array beginning at the specified `begin` address and ending immediately before the specified `end` address, using the specified `allocator`&period; Elide the use of the destructor entirely if (template parameter) `TARGET&lowbar;TYPE` is bitwise copyable, i&period;e&period;, in the overload where the last argument (used only for overload resolution) is of type `bsl&colon;&colon;true&lowbar;type`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TARGET&lowbar;TYPE,
    class ALLOCATOR&gt;
static
void
destroy(
    TARGET&lowbar;TYPE* begin,
    TARGET&lowbar;TYPE* end,
    ALLOCATOR allocator,
    xref:bsl/true_type.adoc[bsl::true&lowbar;type]);
----


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