BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlma::DefaultDeleter< TYPE > Class Template Reference

#include <bdlma_defaultdeleter.h>

Inheritance diagram for bdlma::DefaultDeleter< TYPE >:
bdlma::Deleter< TYPE >

Public Member Functions

 DefaultDeleter (bslma::Allocator *basicAllocator=0)
 
virtual ~DefaultDeleter ()
 Destroy this default deleter.
 
virtual void deleteObject (TYPE *instance)
 
- Public Member Functions inherited from bdlma::Deleter< TYPE >
virtual ~Deleter ()
 Destroy this object deleter.
 

Detailed Description

template<class TYPE>
class bdlma::DefaultDeleter< TYPE >

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.

See bdlma_defaultdeleter

Constructor & Destructor Documentation

◆ DefaultDeleter()

template<class TYPE >
bdlma::DefaultDeleter< TYPE >::DefaultDeleter ( bslma::Allocator basicAllocator = 0)
inline

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()

template<class TYPE >
bdlma::DefaultDeleter< TYPE >::~DefaultDeleter ( )
virtual

Member Function Documentation

◆ deleteObject()

template<class TYPE >
void bdlma::DefaultDeleter< TYPE >::deleteObject ( TYPE *  instance)
inlinevirtual

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.

Implements bdlma::Deleter< TYPE >.


The documentation for this class was generated from the following file: