After fixing (a workaround) another leak (see my "Fl_Help_View memory leak" post) I am still experiencing an unexplained heap memory usage. Basically, anytime I create a window and then delete it, about 1-2 kB of memory is never released and is accumulates every time I create the same or another window.
My program has many segments like this: win = new window(...); win->show(); .. win->hide(); delete win; Every time it is executed, my heap usage is increased by 1-2 kB. To narrow down the problem, I changed the code to something like this: if (win == NULL) win = new window(...); win->show(); .. win->hide(); This time the heap is increased only once and then it stays the same no matter how many times I execute the code. This made me think that the deleting of window does not release all of the allocated memory. After some searching, I found a function Fl_x::set_xid() that allocates memory for each window but I do not see where it is deallocated. This does not explain the whole 1-2 kB of memory lost but maybe there is something else I did not find. Anyone has any ideas and comments? Martin _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

