TAutoClose Class Reference

#include <e32base.h>

Link against: upnpavcontrollerhelper.lib

class TAutoClose
Public Attributes
TiObj
Public Member Functions
~TAutoClose()
voidPop()
voidPushL()

Detailed 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.

Member Attribute Documentation

iObj

TiObj

An instance of the template class.

Constructor & Destructor Documentation

~TAutoClose ( )

~TAutoClose()[inline]

Destructor.

The implementation calls Close() on iObj, the instance of the template class.

Member Function Documentation

Pop ( )

voidPop()[inline]

Pops a single cleanup item from the cleanup stack.

PushL ( )

voidPushL()[inline]

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