Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Symbian > Re: [CW 2.8] De...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 62 of 157
Post > Topic >>

Re: [CW 2.8] Debug / CleanupStack

by MW Ron <mwron@[EMAIL PROTECTED] > May 27, 2004 at 09:47 AM

In article <2hlrtaFeclmrU1@[EMAIL PROTECTED]
>,
 Tobias Stoeger <not.for.reply@[EMAIL PROTECTED]
> wrote:


Thanks for the clarification.  I'll pass this on to engineering for 
their thoughts and enter it into a suggestion database.

Ron

>I don't know if you are familiar to symbian os patterns/idioms, so I'll 
>briefly
>explain the CleanupStack - in my own words  ;-)
>
>The CleanupStack is a class that offers static methods to tem****arily
>put pointers to objects on a stack (last in - first out).
>
>Before your code enters a section that may fail you have to put(push)
pointers 
>to
>your heap allocated objects on this stack.
>
>If your programm/code fails (i.e. a method leaves) then the
Cleanup-Framework
>will garantie that all objects you former put(pushed) on the CleanupStack
will 
>be
>cleaned up and so there are no memory leaks.
>(BTW: In Java the garbage collector will do this job for you.)
>If no leave occur then you have to remove(pop) your object pointers from
the 
>CleanupStack.
>If you pop wrong objects (only in debug mode) then the programm panics
>"E32USER-CBase Panic 90" or if at the end of execution are still objects
on 
>it.
>Both states are facts that your code leaks memory.
>
>I think the debugger should to analyse the memory of a stack member of
the
>class CleanupStack where all pointers to the cleanup objects are stored
>and show the content in the debugger view, like a variable in the
>debugger view ("show as...").
>
>Maybe it's best if you to talk to one of the symbian guys before
implementing 
>this feature.
>
>The great benefit would be, that one could inspect the order and kind of
>objects actually placed on the CleanupStack.
>
>BTW: Thanks for the CW Quick Reference!

-- 
  Metrowerks, one of the world's top 100 companies and influencers 
     in the software development industry. - SD Times  May 2004
               http://www.sdtimes.com/2004sdt100.htm
       
                  Metrowerks, maker of CodeWarrior 
Ron Liechty - MWRon@[EMAIL PROTECTED]
 - http://www.metrowerks.com
 




 4 Posts in Topic:
[CW 2.8] Debug / CleanupStack
Tobias Stoeger <not.fo  2004-05-26 13:23:18 
Re: [CW 2.8] Debug / CleanupStack
MW Ron <mwron@[EMAIL P  2004-05-26 15:09:00 
Re: [CW 2.8] Debug / CleanupStack
Tobias Stoeger <not.fo  2004-05-27 11:49:31 
Re: [CW 2.8] Debug / CleanupStack
MW Ron <mwron@[EMAIL P  2004-05-27 09:47:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 14:34:40 CDT 2008.