Hi Matt,
Thanx for your response -- i tried adding
gHandles[i][j] = 0 but it's still not working -- one
more thing -- if i do lot of scrolling -- and then
press the exit button -it's giving lot of mem leaks
(in hundreds) -- so i added
this code again in sclRepeatEvent just before calling
InitTableData(topNo)
for(i=0;i<kNumTextColumns;i++)
for(j=0;j<kNumRows;j++)
{
if(gHandles[i][j]) {
MemHandleFree(gHandles[i][j]);
gHandles[i][j] = 0 }
}
and after adding this , i 'm getting constant 10
memleaks no matter how many times i scrolls --
from where this memleaks can come?? and how to solve
it??
Thanx for any help
pinaki
--- Matt Graham <[EMAIL PROTECTED]> wrote: >
Pinaki Roy wrote:
> > - but still it's giving memory leak whenever i
> press
> > the exit button and i 'm sure it's bocz the
> memory
> > allocated for ghandle -- how i can free the mem
> for
> > ghandle prpperly??
> > some more observations -
> > 1) i'm calling FrmCloseAllForms() in my AppStop()
> > function -- and after entering into the main page
> > without doing anything if press "exit" button it's
>
> > exiting without any mem leak --
> > 2) if i add FrmCloseAllForms() in my frmCloseEvent
> > it's giving Mem Error - SysFatalAlert with the
> message
> > "MemoryMgr.c, Line:4384,Free Handle--
> > 3) if i put the FrmCloseAllForms() in ExitButon
> case
> > -- there also i 'm getting mem error as read frm
> > unallocated chunk of memory
>
> Sounds like you have the opposite of a memory leak.
> That is, I think
> you're trying to free the handle twice.
> FrmCloseAllForms() sends a
> frmClose event to all your forms, including the form
> that you're in a
> frmClose handler for. Try calling
> FrmCloseAllForms() in your app stop
> logic rather than from a specific form handler.
> Also, if you add change
> your frmCloseEvent logic to be similar to this, your
> error should go away.
>
> case frmCloseEvent:
> for(i=0;i<kNumTextColumns;i++)
> for(j=0;j<kNumRows;j++)
> {
> if(gHandles[i][j]) {
> MemHandleFree(gHandles[i][j]);
> gHandles[i][j] = 0;
> }
> }
> handled = false;
> break;
>
>
>
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and
more.
Go to: http://in.insurance.yahoo.com/licspecial/index.html
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/