Thanks!
At 03:23 PM 4/26/2004, you wrote:
>You have been a good help!
>
>And my only remaining question is, do you know of a way to test if a
pointer
>is still allocated to memory, so I don't try to free up empty pointers?
The answer is to always set a pointer to NULL after you deallocate it. For
example:
delete [] gDescription;
gDescription = NULL;
or
if (gName != NULL) {
MemPtrFree(gName);
gName = NULL;
}
I separate those cases, as MemPtrFree doesn't handle NULL pointers, while
delete (and its array form) do.
-- Ben Combee, DTS technical lead, PalmSource, Inc.
Read "Combee on Palm OS" at http://palmos.combee.net/
--
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/