> Would be great if deleting widgets was covered in the docs. > I think the reason it hasn't is because it has been evolving, > and there are several caveats (that should probably be listed) > depending on circumstances of when to delete (callbacks vs events) > and when delete is handled for you (exiting, window/group destruction)
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? _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

