> My assumption was that if I have a class that has a window in it, when I > delete that class, window and all widgets will be deleted and their memory > deallocated. > Assumption is a mother of all f*ckups. > > Now, I added delete_widget(window) in the class destructor because I did not > want to do it in the window callback because the class and the window may > still be used. > This improved things but did not removed the leak completely. > My app is an embedded app with limited resources and may run for months and I > cannot afford any memory leaks. > > Anyone has suggestions on how to cleanup my class/window completely? > Any other FLTK functions I need to call?
The fact that changing "delete win" to delete_widget(win) makes any difference is suspicious if you aren't doing this in a callback context. Are you sure that the window's parent() is 0 when you delete the window? _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

