class TAutoClose |
Automatically calls Close() on an object when that object goes out of scope.
The behaviour takes advantage of the fact that the compiler automatically destroys objects that go out of scope.
Public Member Functions | |
---|---|
~TAutoClose() | |
void | Pop() |
void | PushL() |
Private Member Functions | |
---|---|
void | Close(TAny *) |
Public Attributes | |
---|---|
T | iObj |
~TAutoClose | ( | ) | [inline] |
Destructor.
The implementation calls Close() on iObj, the instance of the template class.
void | PushL | ( | ) | [inline] |
Pushes a cleanup item onto the cleanup stack, so that Close() is called on the templated class object, iObj, if a leave occurs.