Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <e32base.h>

Class TAutoClose

class TAutoClose;

Description

Automatically calls TAutoClose::Close(TAny *) 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.

Members

Defined in TAutoClose:


Construction and destruction


~TAutoClose()

inline ~TAutoClose();

Description

Destructor.

The implementation calls TAutoClose::Close(TAny *) on iObj, the instance of the template class.

[Top]


Member functions


PushL()

inline void PushL();

Description

Pushes a cleanup item onto the cleanup stack, so that TAutoClose::Close(TAny *) is called on the templated class object, iObj, if a leave occurs.


Pop()

inline void Pop();

Description

Pops a single cleanup item from the cleanup stack.

[Top]


Member data


iObj

T iObj;

Description

An instance of the template class.