BloombergLP::bslma::DestructorGuard::DestructorGuard

Create a destructor guard that manages the specified object.

Synopsis

Declared in <bslma_destructorguard.h>

explicit
DestructorGuard(TYPE* object);

Description

Create a destructor guard that unconditionally manages the specified object, and invokes the destructor of object upon the destruction of this guard. The behavior is undefined unless object is non-zero.

Parameters

NameDescription
objectAddress of the object to manage.