[#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&period; Instances of `DefaultDeleter&lt;TYPE&gt;` either use an allocator optionally supplied at construction, or the currently installed default allocator if an allocator is not provided&period;

== Synopsis

Declared in `&lt;bdlma&lowbar;defaultdeleter&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
class DefaultDeleter
    : public xref:BloombergLP/bdlma/Deleter.adoc[Deleter&lt;TYPE&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlma/Deleter.adoc[Deleter&lt;TYPE&gt;]`
| Provide a protocol (or pure interface) for a thread&hyphen;safe object deleter&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlma/DefaultDeleter/2constructor.adoc[`DefaultDeleter`]         [.small]#[constructor]#
| Create a default deleter&period; Optionally specify a `basicAllocator` used to manage the memory footprint of objects passed to the `deleteObject` method&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;
| xref:BloombergLP/bdlma/DefaultDeleter/2destructor.adoc[`&#126;DefaultDeleter`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this default deleter&period;
| 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&period; 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&period; Note that this method does not destroy the deleter itself&period;
|===



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