opensubscriber
   Find in this group all groups
 
Unknown more information…

p : palm-dev-forum@palm.lyris.net 5 May 2005 • 6:01AM -0400

Re: shut down problem
by Chris Tutty

REPLY TO AUTHOR
 
REPLY TO GROUP




From: "Scott Erickson" <serickson@fb-4...>
> functions with no problems.  then in appstop i try to free the memory with
> MemPtrFree(currentSettings);  yet the simulator tells me i have an unfreed
> chunk (same as the value of the pointer to the variable), and the device
> softresets at this point.  how can i free the chunk of mem i am using for
> this variable?  below is some relavent code from my app...
>
>  typedef struct{
>   Boolean monitor;
>   UInt32 aUpdate;
>   Char* lastUpdate;
>   Char* license;
>  } appSettings;
> appSettings *currentSettings;
>
> (in appstop)
> MemPtrFree(currentSettings);
>
What are lastUpdate and license pointing to?  Are these allocated
and released elsewhere or could these be the unfreed chunks?

I also have a habit of setting pointers to null after freeing them.
This helps to identify accesses after release and multiple release
attempts.  Certainly the unfreed chunk itself shouldn't produce
a reset so you might be looking for a different problem
completely, with the unfreed chunk just a side-issue.

Chris Tutty


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

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.