If I understand your email correctly -

The pointer you passed to LstSetListChoices is no longer valid after you call MemHandleFree so subsequent access will fail.
You'll need to free the handle but not until you are done using the pointer, perhaps when you exit the form containing the list.


I hope this makes sense..

Dana

Wendel wrote:

Hi all,

Im working with list, inserting and removing items.
Actually after inserts, the appz exit with leak memory.
To solve thats leaky memory, we are using MemHandleFree(). With MemHandleFree theres 
no more leaky memory but after we inserted MemHandleFree, all the Lib Calls stop 
working.
Why MemHandleFree is affecting Lib Calls?



List Item Insert Code:
...
 hT = SysFormPointerArrayToStrings(ItemListColTab,QtdeColLstTab);
 LstSetListChoices(lstColuna, (Char **)MemHandleLock(hT), QtdeColLstTab);
 LstDrawList(lstColuna);

MemHandleFree:
 ...
 LstSetListChoices(LstCols, NULL,0);    
 MemHandleUnlock(hT);
 MemHandleFree(hT);

thanx

Wendel B Silva



--------------------------------------------------------------------------
WebMail Secrel (C) - www.secrel.com.br








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

Reply via email to