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