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