Location:
e32base.h
inline void CleanupArrayDeletePushL(T *aPtr);
Constructs and pushes a TCleanupItem
object onto the cleanup stack.
The TCleanupItem
encapsulates:
the pointer aPtr to an array of type class T objects to be cleaned up
an associated cleanup operation.
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.
...
|