I am already calling FrmCloseAllForms() in my AppStop
routine but it seems it behaves differently and does
not do cleanup when AppStop event is called.  Whereas 
when I jump one form to another it do clean up.



At 17:27 2002-10-7 -0700, you wrote:
>If my application has 2 forms, first with List
>populated dynamically (using method described in API
>Reference pdf page 356-357)  and second form contains
>few fields for details.   When I exit application
from
>first form I get 1 memory leak but if I exit from
>second form, no memory leaks.

It sounds like you need a call to FrmCloseAllForms()
in your AppStop 
routine to send a frmClose event to all open forms
where your code would 
free the list's data.

-- 
Ben Combee <[EMAIL PROTECTED]>

-----Original Message-----

If my application has 2 forms, first with List
populated dynamically (using method described in API
Reference pdf page 356-357)  and second form contains
few fields for details.   When I exit application from
first form I get 1 memory leak but if I exit from
second form, no memory leaks.

Please also look the following messages and advise.

thanks.

-----Previous Message-----

In API Reference pdf page 356-357 provides details of
how dynamic list is populated.  

But I cannot find any infomation anywhere about HOW to
release memory for these type of lists.


-----Original Message-----

*Please correct me if you find any of my assumption
wrong.  

I have this test application contains two forms.  Both
form contains a list which is populated from database
on FrmOpenEvent.  I have a function which allocates
memory and populates data and Callback function to
draw list.

When I exit my application it gives me one memory
leak, no matter how many times I toggle between these
two forms.   So I reached to a conclusion that
FrmCloseEvent automatically realse the memory of a
form if you are jumping to second form.  I don't have
any cleanup code on form close event. 

If I write code on FrmCloseEvent 
MemPtrFree(ListData) ;
handled = false ;

Application crashes when I try to jump to second form,
if I exit application from first form I get no memory
leaks and any crashes.  


Please help me understand this issue and suggest any
solution.

Thanks in advance.




__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.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