Roger Chaplin wrote in message <3194@palm-dev-forum>...
>"Richard Hartman" <[EMAIL PROTECTED]> wrote:
>
>> with OS 3.3. The problem is a dialog that reports:
>>
>> "UIAppShell" (unknown version) reports "SystemMgr.c, Line 4192,
>> Possible memory leak. Use the 'hd 0' command to find chunks owned
>> by your app. These chunks have an ownerID of 2". If this is the
latest
>> version of "UIAppShell", please report this to the application
author.
>>
>> This error occurs when leaving the app.
>>
>[ The rest, having to do with field text handles, is probably
irrelevant. ]
>
>Are you calling FrmCloseAllForms() when your app stops?
I wasn't, but I am now. I used to have appStopEvent just
fall through to the handling of frmCloseEvent. I was not
getting a frmCloseEvent before, but I am now that I added
those three lines. But the end result is no real change. The
error still occurs.
Here is the main event loop.
static Boolean MainFormHandleEvent(EventPtr eventP)
{
Boolean handled = false;
FormPtr frmP;
switch (eventP->eType)
{
case menuEvent:
return MainFormDoCommand(eventP->data.menu.itemID);
case frmOpenEvent:
frmP = FrmGetActiveForm();
MainFormInit(frmP);
FrmDrawForm (frmP);
handled = true;
break;
case appStopEvent:
FrmCloseAllForms(); // added
handled = true; // added
break; // added
case frmCloseEvent:
frmP = FrmGetActiveForm();
MainFormCleanup(frmP);
handled = true;
break;
default:
break;
}
return handled;
}
This thing really doesn't do much, and it was based on the
"starter" app that CW fills in when you create a new project.
Again, the problem is only in POSE ... on a real device there
do not appear to be any problems ... so far ...
-rmh
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html