Memory leaks suck.
Mostly, they're my fault, and I've been learning a bit lately about
how not to be such a pig with memory. This one, however, might not
be my fault, and I'm losing a ton of memory over time to it.
The following line loses 134 bytes per execution:
handled=SelectDay(selectDayByDay,&kEDDmonth, &kEDDday, &kEDDyear,
"Enter Date for GA Calc");
I thought maybe I was losing the CharPtr, since the space is
allocated, but I don't have any way of knowing if it's de-allocated.
So I tried:
alertH=MemHandleNew(12);
alertStr=MemHandleLock(alertH);
StrCopy(alertStr, "Enter Date for GA Calc:");
handled=SelectDay(selectDayByDay,&kEDDmonth,&kEDDday,&kEDDyear, alertStr);
MemHandleUnlock(alertH);
MemHandleFree(alertH);
That still lost 134 bytes. What am I missing?
-----------------------------------------------------------------------
Michael Hutchens PregCalc 3.0 Professional:
[EMAIL PROTECTED] http://www.thenar.com/pregcalc
FloChart:
Please quote previous http://www.thenar.com/chart
correspondence when discussing Ranson:
technical support issues. http://www.thenar.com/Ranson
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/