Thanks for the reply.

If I don't free the CharPtr that the label has, and set a new label, I get
memory leak.  But if I try to free it, I get "Bad chunk header" error.  Am I
making any sense?

> I think that freeing of the handle only applies to textfields.  In my
> code I don't free the handle for a button label.
>
>
>
> Ken Glover wrote:
>
> > Does anyone know what the error "MemoryMgrNew.c, Line:4240, Bad chunk
> > header" mean?
> > Here's some code:
> >
> > /* free the old label text so a new one can be assigned */
> >
> >   formP = FrmGetFormPtr(SyncPrefsForm);
> >   serialP = FrmGetObjectPtr(formP,  FrmGetObjectIndex(formP,
> > SyncPrefsSerialNumberSelTrigger));
> >
> >   oldTextP = CtlGetLabel(serialP);
> >   MemPtrFree(oldTextP);  <-- error occurrs here
> >
> > /* end */
> >
> > Am I doing this right?  I am using 33EZDebug ROM on PalmV emulator.
> > Thanks for reading this!
> >
> > Ken Glover
> > Palm Programming Group
> > Eclipse Inc.
> > www.eclipseinc.com
>
>

Reply via email to