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.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.