Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32base.h

Class TAutoClose

class TAutoClose;

Description

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.

Members

Defined in TAutoClose:
Pop(), PushL(), iObj, ~TAutoClose()


Construction and destruction


~TAutoClose()

inline ~TAutoClose();

Description

Destructor.

The implementation calls Close() 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 Close() 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.