For you second method, you'll still need to unlock the pointer with

MemPtrUnlock(testPtr);


On 27 Jan 2002 at 10:21, Andy Yeong wrote:

> Hi,
> 
> As a matter for better understanding, I'm wondering is there
> any difference between the 2 program.
> 
> char *testPtr;
> MemHandle testH;
> 
> testH = MemHandleNew(10);       // just create a memory of 10 bytes
> testPtr = MemHandleLock(testH);
> 
> 
> Program 1's freeing method
> ----------------------------
> 
> MemHandleUnlock(testH);
> MemHandleFree(testH);
> 
> 
> Program 2's freeing method
> ----------------------------
> 
> MemPtrFree(testPtr);
> 
> 
> I have tested both methods and it works real fine.
> Which is better ? Or simply there isn't any difference ?
> 
> Thanks
> 
> Best Regards
> Andy
> 
> 
> 
> 
> -- 
> 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/

Reply via email to