--- LuLarry01 <[EMAIL PROTECTED]> wrote:
> So I've been trying to debug my memory leak for about a week 
> now and I'm not getting anywhere, ...

Do you call FrmCloseAllForms() in your AppStop()?  You'll get a memory
leak if you don't.

Run your app on the latest POSEr and you should get all the info you
need to figure out what is causing the memory leak.  If you forget to
call FrmCloseAllForms(), POSEr will report a memory leak when you exit
your app.

> ... so I question my understanding of the use of
> handles.  Can someone tell me if I'm totally offbase with this.
> 
> Everytime I lock a handle, I need to unlock the handle.  I can 
> use the function MemHandleLockCount to determine how many times 
> the handle has been locked and needs to be unlocked.  If I have a 
> MemHandleLockCount returns zero then the handle has been unlocked 
> the appropriate number of times.  In my appStop function, I call 
> MemHandleFree to free up the memory I allocated with the 
> MemHandleNew command.  

Sounds accurate. Use these functions in this order:

1. MemHandleNew
2. MemHandleLock
3. use the memory
4. MemHandleUnlock
5. MemHandleFree

You probably shouldn't count on using MemHandleLockCount since it is
documented as "System Use Only".


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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

Reply via email to