HLock
are undone by a single call to HUnlock
.[6] In Palm OS and Windows, handles are an opaque type and must be de-referenced with MemHandleLock
on Palm OS or Global/LocalLock
on Windows. When a Palm or Windows application is finished with a handle, it calls MemHandleUnlock
or Global/LocalUnlock
. Palm OS and Windows keep a lock count for blocks; after three calls to MemHandleLock
, a block will only become unlocked after three calls to MemHandleUnlock
.HLock()
and other APIs were rewritten to implement handle locking in a way other than flagging the high bits of handles. But many Macintosh application programmers and a great deal of the Macintosh system software code itself accessed the flags directly rather than using the APIs, such as HLock()
, which had been provided to manipulate them. By doing this they rendered their applications incompatible with true 32-bit addressing, and this became known as not being '32-bit clean'.malloc
implementation) underneath.[6] Apple recommends that Mac OS X code use malloc
and free
'almost exclusively'.[12]