Pushing M-class into cleanupstack

Login to reply to this topic.
Wed, 2007-06-27 19:10
Joined: 2007-06-27
Forum posts: 2

Hi,

I noticed that when I push an M-Class object into a clean up stack, it will call a TAny* version of CleanupStack::PushL() and CleanupStack::PopL(), which just frees memory using User::Free().

Is there any way to insert M class objects into cleanup stack without creating my own TCleanupItem? Maybe some generic TCleanupItem designed for M classes?

Thanks,

-Ji


Wed, 2007-06-27 20:16
Joined: 2003-12-05
Forum posts: 683
Re: Pushing M-class into cleanupstack

1. Make the destructor of the M class virtual
2. Use CleanupDeletePushL

Fri, 2007-06-29 19:50
Joined: 2007-06-27
Forum posts: 2
Re: Pushing M-class into cleanupstack

That was exactly what I needed. Thanks Smiling

  • Login to reply to this topic.