I have a memory leak (2 blocks) in my application that only happens if the
user taps the home/launcher button while in my first modal dialog. The event
loop and main application occurs after this code is called. On the theory
that maybe I had unbalanced allocate/deallocate in the main part of the
application when the go to launcher event is received, I've tried commenting
it out but I still get the leak.

This is my code to present the (true) modal dialog. Is this the right
technique to use?

 // Display password form
 oldActiveFormP = FrmGetActiveForm();
 formP = FrmInitForm(UnlockForm);
 FrmSetEventHandler(formP, UnlockFormHandleEvent);
 FrmSetActiveForm(formP);
 FrmDrawForm(formP);
 SetFormFocusById(formP, UnlockEntryField);
 FrmDoDialog(formP);

 // Clean up
 FrmSetActiveForm(NULL);
 FrmDeleteForm(formP);
 FrmSetActiveForm(oldActiveFormP);

The code for the OK button does nothing, I just return false to make the
dialog close.

The unlock form itself makes no direct memory block allocations. At one
point I  lock the handle of the text entry field, but since I immediately
unlock it after a compare I'm pretty sure that isn't it.

Any thoughts? And I am calling FrmCloseAllForms() or whatever it is. :)



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

Reply via email to