Defined in:A helper class the wraps a pointer to a shared object.
template <class type> class AutoRelease
||The type of object to which the |
explicit AutoRelease(type *ptr);
||A pointer to the shared object that is wrapped by the |
AutoReleaseclass template is a helper class that wraps a pointer to a shared object. When an
AutoReleaseobject is destroyed (usually by going out of scope), the
Releasefunction is automatically called for the object that was passed into the
ptrparameter when the
AutoReleaseobject was constructed.
AutoReleaseobject behaves like a pointer to an object of the type given by the
typetemplate parameter. An
AutoReleaseobject can be passed as a function parameter wherever a pointer to
typeis expected, and the
->operator can be used to access members of the object that the