Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: e32base.inl

CleanupDeletePushL()

inline void CleanupDeletePushL(T *aPtr);

Description

Constructs and pushes a TCleanupItem object onto the cleanup stack.

The TCleanupItem encapsulates:

The cleanup operation is the private static function Delete() of the templated class CleanupDelete, and is called as a result of a subsequent call to CleanupStack::PopAndDestroy().

CleanupDelete::Delete() is passed a pointer to the class T object to be cleaned up, and the function implements cleanup by deleting the passed object.

An example of its use:

...
CTestOne* one = new (ELeave) CTestOne;
CleanupDeletePushL(one);
...
CleanupStack::PopAndDestroy(); // <--- results in "one" being deleted.
...

Parameters

T *aPtr

A pointer to a templated class T type object for which the cleanup item is being created.

See also: