[#BloombergLP-bslalg-ArrayDestructionPrimitives-destroy-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayDestructionPrimitives.adoc[ArrayDestructionPrimitives]::destroy :relfileprefix: ../../../ :mrdocs: Destroy each `TARGET_TYPE` in `[begin, end)]`. == Synopsis Declared in `<bslalg_arraydestructionprimitives.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TARGET_TYPE> static void destroy( TARGET_TYPE* begin, TARGET_TYPE* end, xref:bsl/true_type.adoc[bsl::true_type] traits); ---- == Description Destroy each instance of `TARGET_TYPE` in the array beginning at the specified `begin` address and ending immediately before the specified `end` address. Elide the use of the destructor entirely if (template parameter) `TARGET_TYPE` is bitwise copyable, i.e. in the overload where the last argument (used only for overload resolution) if of type `bsl::true_type`. == Parameters [cols="1,4"] |=== | Name| Description | *begin* | beginning of the range of elements to destroy | *end* | end of the range of elements to destroy (one past the last) | *traits* | unused trait tag for overload resolution |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#