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>

template<class TYPE>
class DefaultDeleter
    : public Deleter<TYPE>

Base Classes

Name

Description

Deleter<TYPE>

Provide a protocol (or pure interface) for a thread‐safe object deleter.

Member Functions

Name

Description

DefaultDeleter [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.

~DefaultDeleter [destructor] [virtual]

Destroy this default deleter.

deleteObject [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.

Created with MrDocs