For each time your app calls MemHandleLock, it must call MemHandleUnlock or MemPtrUnlock for the same pointer/handle. Otherwise you may end up with the dreaded chunk over-locked error. As long as the memory location is unlocked, it doesn't matter if you do it as a Ptr or Handle. There have been some archived discussions on which is the faster or better method. Personally, I prefer to unlock using the matching function call. Makes for better book-keeping.
----- Original Message ----- From: "Ralph Krausse" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 9:09 AM Subject: Can one do this? > Ptr p = (Ptr)MemHandleLock((VoidHand)h); > { > do something thing with p.... > } > MemPtrUnlock(p); > > Does this make a difference? It is just good coding > practices to use MemHandleUnlock(h) instead or using > MemPtrUnlock does the same.... > > thanks > Ralph Krausse > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/