From: "Scott Erickson" <[EMAIL PROTECTED]>
> 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/