hej!
i went home last night thinking about how this damn
FATAL EXCEPTION kept on occuring.. it is the strangest
thing... only happens after a long time of use, and
60% of the time..
not something that is easy to trace.
here is what i was thinking it could be:
a) synchronization problems
- this i doubt.. otherwise it would happen all
the time.
b) form allocation/deallocation
- i doubted this one at first, but then thought
about it when walking to work..
this is what i had in my "event handler"
---
Boolean
levelEditorEventHandler(EventPtr event)
{
Boolean processed;
#ifdef __GNUC__
CALLBACK_PROLOGUE
#endif
processed = FALSE;
switch (event->eType)
{
case frmOpenEvent:
FrmDrawForm(FrmGetActiveForm());
<snip>
processed = TRUE;
break;
< snip >
case frmCloseEvent:
< snip >
processed = TRUE;
break;
default:
break;
}
#ifdef __GNUC__
CALLBACK_EPILOGUE
#endif
return(processed);
}
---
here is my question. :)
if i return TRUE (these are #defines by the way) when the
frmCloseEvent event occurs, the system will not deallocate
the memory for that form right?
i have changed TRUE to FALSE, and i have not been able to
reproduce this problem (yet)..
any comments on this?
i have a feeling that because i was returning TRUE, the
system may not have had a chance to free up any memory that
the form was using?
comments?
az.
--
Aaron Ardiri
Lecturer http://www.hig.se/~ardiri/
University-College i G�vle mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN
Tel: +46 26 64 87 38 Fax: +46 26 64 87 88
Mob: +46 70 352 8192 A/H: +46 26 10 16 11