The svn version 6622 should fix your problem without any patch and will not provoke a memory leak as fnt should be freed when it has to. (BTW, it also fix a compilation problem that happens on case sensitive filesystems) Fabien
> liaojifang wrote: > > > I have found that If I delete free(fnt)(Fl_x.cxx:fl_set_spot()),It didn't > > have crashes . > > > > as follows: > > > > #if USE_XFT > > #warning XFT support here > > fnt = NULL;//fl_get_font_xfld(font, size); > > if (!fnt) fnt = "-misc-fixed-*"; > > fs = XCreateFontSet(fl_display, fnt, &missing_list, > > &missing_count, &def_string); > > //free(fnt); > > #else > > fnt = fl_get_font_xfld(font, size); > > if (!fnt) fnt = "-misc-fixed-*"; > > fs = XCreateFontSet(fl_display, fnt, &missing_list, > > &missing_count, &def_string); > > free(fnt); > > #endif > > Thanks liao, this is a bug because when setting fnt to a static constant > string, fnt should _not_ be released not only where you modified it but also > in the else code for non xft use... > I'll have a look in my ubuntu setup to fix that. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

