DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2185
Version: 1.3-current


Had a little more time to peek at this.

Probably X windows specific.

Looks like our XOpenIM() calls in src/Fl_x.cxx is something to look into,
based on that valgrind.log -- the biggest chunks of memory are associated
with realloc()'s within that call.

Fltk's use of XOpenIM is new in 1.3.x, and is not in 1.1.9 at all, so we
might be using it wrong, or something, as it seems to realloc() memory
larger and larger with each call.

XOpenIM is used in two places; 

   o fl_init_xim()
   o fl_handle()

The use in fl_init_xim() seems to do cleanup correctly, but fl_handle()
does not. In fact, fl_handle() has this comment which I think says it all:

*************************************
     // XCloseIM(xim_im); FIXME
        /* XFree86 has a bug when closing IM it crashes in
         * _XlcCreateDefaultCharSet() !  So don't close it.
         * This will cause a memory leak :-(
         */
*************************************

So that's probably the leak right there.


Link: http://www.fltk.org/str.php?L2185
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to