Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bslma::DestructorGuard< TYPE > Class Template Reference

#include <bslma_destructorguard.h>

List of all members.

Public Member Functions

 DestructorGuard (TYPE *object)
 ~DestructorGuard ()

Detailed Description

template<class TYPE>
class bslma::DestructorGuard< TYPE >

This class implements a guard that unconditionally destroys a managed object upon destruction by invoking the (managed) object's destructor.

See Component bslma_destructorguard


Constructor & Destructor Documentation

template<class TYPE>
bslma::DestructorGuard< TYPE >::DestructorGuard ( TYPE *  object  )  [explicit]

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.

template<class TYPE>
bslma::DestructorGuard< TYPE >::~DestructorGuard (  ) 

Destroy this destructor guard and the object it manages by invoking the destructor of the (managed) object.


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