Implementing you r own cleanup stack...

Login to reply to this topic.
Thu, 2007-03-08 07:57
Joined: 2004-09-06
Forum posts: 235
Hi,
    I am writing device independent code. Actually I am kind of porting an application from S60 to Windows mobile/PPC.
Cleanup stack is one complex part that Symbian has and others dont.
So, I either have to write cleanup stack mechanism for non-symbian devices so that the code remains portable or not at all use cleanup stack for those handsets(Windows has its own garbage collector.... relief Cool).

Is it a good idea to implement your own cleanup stack for other devices? What are the complexities involved? Has anyone done this before?

All I need is to create a dummy CBase class with overloaded new. And a stack which can be used for pushing pointers and freeing them. And how do I mark this stack for unrolling it in case of leave?

--Vink

Thu, 2007-03-08 10:14
Joined: 2004-11-29
Forum posts: 1197
Re: Implementing you r own cleanup stack...
I guess you would have to re-implement TRAPs and leaves too...

You can probably reverse engineer them pretty good useing the public SDK.

But it sounds like a mess... If the app is written for S60, I get the feel that there is a lot more you have to reimplement besides cleanupstack and TRAP...



  • Login to reply to this topic.