Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: e32base.inl

CleanupArrayDeletePushL()

inline void CleanupArrayDeletePushL(T *aPtr);

Description

Constructs and pushes a TCleanupItem object onto the cleanup stack.

The TCleanupItem encapsulates:

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

CleanupArrayDelete::ArrayDelete() is passed a pointer to the array of class T objects to be cleaned up, and the function implements cleanup by deleting the passed array using the delete [] operator.

An example of its use:

...
RTestOne* one = new (ELeave) RTestOne [KSomeArraySize];
CleanupArrayDeletePushL(one);
... // Do something with the object.........
CleanupStack::PopAndDestroy(); // <--- results in the array "one" being deleted.
...

Parameters

T *aPtr

A pointer to an array of class T type objects for which the cleanup item is being created.

See also: