Why not free the handle in your clean up anyway.

Use something like:
if (MyMemHandleVar != 0)
MemHandleFree(MyMemHandleVar);

As for Unlocking you should really do this as soon as possible elsewhere in
your code, not leaving it until closing the app.

Bazza

> -----Original Message-----
> From: KMoore
> 
> I have create a form that either edits a record or creates a new one
> depending on the record index passed to it.
> I call a "hitbutton=FrmDoDialog" to get the user input from the
> form then handle it "hitbutton"... however problem comes when I press one
> the palm device "control/hot buttons" to go to another app... I would like
> to exit the app gracefull ... I handle the formCloseEvent... I clean all I
> need ... but my circumstance calls for me to know wether a MemHandle is
> locked or not... currently I approach it by saying "if (MyMemHandleVar) {
> MemHandleUnlock(MyMemHandleVar); } " ... this not good because
> ocassionally I get the "Handle is not locked" and "chunk under locked"
> ...finally
> the QUESTION is how do I determine if the MyMemHandleVar is lcoked?




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

Reply via email to