auto_release_t< T > Class Template Reference

List of all members.

Detailed Description

template<class T>
class auto_release_t< T >

Template class that releases a held resource upon destruction.

This template class is an analog of auto_ptr<T> from the C++ standard template library, but rather than freeing a heap object, it releases a resource by calling the resource's "release" method. This only works if the resource has a method

 void release();

For more complex releasing requirements, see the specializations auto_release_t<queue_based_lock_t>, auto_release_t<pthread_mutex_t>, and the analogous templates for read-write synchronization primitives auto_release_r_t<>, and auto_release_w_t<>

Used in the storage manager by buffer manager and io layer.

Definition at line 79 of file auto_release.h.

Public Member Functions

NORET auto_release_t (T &t)
NORET ~auto_release_t ()


The documentation for this class was generated from the following file:
Generated on Wed Jul 7 17:22:42 2010 for Shore Storage Manager by  doxygen 1.4.7