hi Aaron,
In what circumstances "MemHandleNew" will return NULL. How to solve this
problem?
rgds,
ailee
>From: Aaron Ardiri <[EMAIL PROTECTED]>
>Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>Subject: Re: Memory lock question
>Date: Thu, 24 May 2001 10:49:20 +0200 (MET DST)
>
> > i am very confusing between "MemHandleUNlock" and "MemHandleFree".
> >
> > What is the definition to both ?
>
> MemHandleUnlock() = unlock, not free
> MemHandleFree() = free :P
>
> handles need to be locked in order to reference them as a simple
> pointer. you lock a handle using MemHandleLock(). calling
> MemHandleUnlock() invalidates the pointer that was previously
> obtained via locking. :)
>
> handles consume space, if you allocated a handle using
> MemHandleNew() - then, you should clean up after yourself using
> MemHandleFree().
>
> if you obtained your handle using DmGet1Resource() or similar,
> you cannot free it using MemHandleFree(). you should, by definition
> call DmReleaseResource(), however, i believe, if you look at the
> source code, you'll see this routine does nothing anyhow :P it
> may in future versions of the os.. so, use it :)
>
> i would suggest you take a look at the memory management sections
> inside the SDK documentation for more detailed explanations.
>
>// az
>[EMAIL PROTECTED]
>http://www.ardiri.com/ <--- free games!
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe,
>please see http://www.palmos.com/dev/tech/support/forums/
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/