> I'll go see if I can grab a new ROM image to test against to
> make sure that the leaks go away.  I will ultimatly need to
> run on the 3.5.2 OS (since that is the version in my PDA),
> so I guess I'll have to accept those leaks in my final testing.
> Don't like it, but I guess I can live with it.
>
> Thanks for the info on the cleanup steps.  It will be a big help
> in my understanding the process.

Just to be clear, here:

You do not need a new ROM image.  The leaks are not due to an OS bug.  The
stack trace on the leaks shows they are leaking because of a bug in your
code, in how you stop the app.

The "app's final cleanup code" that I was talking about needs to be written
by you.  Look at the Memopad sample app for a great example of how the
appStop scenario is supposed to be handled.

(Caps are used below for emphasis on technical details, not for shouting ;-)

(1)  You should NOT handle appStopEvent in your form handler.
(2)  In your code that executes after your event loop has terminated, call
FrmCloseAllForms().
(3)  Make sure your form handler returns "false" from the frmCloseEvent, do
NOT explicitly call FrmEraseForm() or FrmDeleteForm() -- let the OS do that
for you, by returning "false".

These fixes to your code will make the leaks disappear.



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

Reply via email to