So I should never reallocate global variables in appstop?

Ok, I know you know what your talking about.

Thanks!

 


-----Original Message-----
From: Ben Combee [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 03, 2004 3:41 PM
To: Palm Developer Forum
Subject: RE: bus error "destroy global chain"

At 02:36 PM 11/3/2004, you wrote:
>I reallocate the assigned space to all global pointers on AppStop, and then
>I delete those pointers.  This helped prevent memory leaks previously,
would
>this problem be related to those pointers or do you think it might be a
>different global variable of mine.

If you're freeing all of your applications memory, then this is the 
problem, as entries on this global destructor list are allocated on the 
heap, and CW's runtime code would be accessing freed memory.  You don't 
need to do that -- Palm OS will free all of the memory for you in the app 
shutdown code, you're just preventing a warning from POSE.


-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc.
    "Combee on Palm OS" weblog: http://palmos.combee.net/
    Developer Fourm Archives:   http://news.palmos.com/read/all_forums/



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to