This class implements a proctor that invokes the release method of its managed allocator or pool at destruction unless the proctor's release method is invoked.
Declared in <bdlma_autoreleaser.h>
template<class ALLOCATOR>
class AutoReleaser;
| Name | Description |
|---|---|
AutoReleaser [constructor] | Create a proctor object to manage the specified originalAllocator. |
~AutoReleaser [destructor] | Destroy this proctor object. |
release | Release from management the allocator or pool currently managed by this proctor. If no allocator or pool is currently being managed, this method has no effect. |
reset | Set the specified newAllocator as the allocator or pool to be managed by this proctor. |