> I agree with you that it looks like some memory overwriting. Yup - really does look like a pointer error, or array sizing or something...
> But as I was unable to find an example of a menubar built up > with add(), I started suspecting that my menubar code was wrong. Whenever you need a worked example of something in fltk-1.x, try Greg's tips page: Here's a good one to start with, he has 4 or 5 menu examples on that page that might be relevant to you- http://www.seriss.com/people/erco/fltk/#Menu_ChangeLabel > I did check it with valgrind, and I only get messages of > unreclaimed memory at program exit: > > ==3580== HEAP SUMMARY: > ==3580== in use at exit: 2,075,618 bytes in 3,043 blocks > ==3580== total heap usage: 82,762 allocs, 79,719 frees, > 29,561,251 bytes allocated > > but I cannot track the offending messages to my code, but to > classes like Fl_File_Chooser, etc. It probably means that I > did not understand the basics and fltk is forced to forget > some memory on program exit. No, I think you are probably OK with that. That's normal behaviour - the fltk lib uses a variety of things that are reaped only at program exit, by the runtime's normal process shutdown sequence. Valgrind sees these things being reaped by the runtime (rather than by the app code itself) and flags a warning, but it is intended. SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

