[#BloombergLP-bdlma-DefaultDeleter] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::DefaultDeleter :relfileprefix: ../../ :mrdocs: This `class` provides a default concrete implementation of the `Deleter` protocol. Instances of `DefaultDeleter<TYPE>` either use an allocator optionally supplied at construction, or the currently installed default allocator if an allocator is not provided. == Synopsis Declared in `<bdlma_defaultdeleter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class DefaultDeleter : public xref:BloombergLP/bdlma/Deleter.adoc[Deleter<TYPE>] ---- == Base Classes [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlma/Deleter.adoc[Deleter<TYPE>]` | Provide a protocol (or pure interface) for a thread‐safe object deleter. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlma/DefaultDeleter/2constructor.adoc[`DefaultDeleter`] [.small]#[constructor]# | Create a default deleter. Optionally specify a `basicAllocator` used to manage the memory footprint of objects passed to the `deleteObject` method. If `basicAllocator` is 0, the currently installed default allocator is used. | xref:BloombergLP/bdlma/DefaultDeleter/2destructor.adoc[`~DefaultDeleter`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this default deleter. | xref:BloombergLP/bdlma/DefaultDeleter/deleteObject.adoc[`deleteObject`] [.small]#[virtual]# | Destroy the specified `instance` based on its static type and return its memory footprint to the appropriate memory manager. The behavior is undefined unless the memory for the footprint of `instance` was supplied by the same allocator as is used by this default deleter. Note that this method does not destroy the deleter itself. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#