Hi All,
Have written an application where I have a class, and in its destructor,I
free the memory I am allocating to it when the object is made. Now, I have a
pointer to which I am freeing memory in destructor.
When I exit the application,the code is getting called after AppStop().

In OS 3.5, this works fine.Now, when I port this code onto 4.0, the pointer
variable is invalid ( has already been freed by system).And I get a error at
MemPtrFree, coz the pointer is invalid.

As my code for destroy object is called at many places, how do I
particularly check that my pointer has already been de-referenced by the
system( whereas it used to be done later in 3.5)? Its not NULL,only
de-referenced.
I can't use any of the MemoryMgr APIs, as they cannot take an invalid
parameter.

Any help would be appreciated.Anybody from Palm?

--





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

Reply via email to