DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L1894 Version: 1.3-current Wouldn't it be better to solve such problems to add in the the Widget destructor a parent remove() call so that the widget smoothly detach from its parent before it destroys ? This implies that children should always be destroyed before their parents, and should be documented but this make sense to me. A radical fix would be the use of a new is_valid(Fl_Widget*) static method that would associate a couple(unique_id,pointer) dictionary to any created widget during its life cycle. This has been discussed before, and I demonstrated the feasability of such implementation by efficient use of hash tables for the dictionary impl. For it to work, any Fl_Widget constructor would 'register' in the dictionary, and its (virtual) destructor would 'unregister' himself from the dict. Then the destructor should be protected and the unique way to delete a Widget would be to call a static 'destroy' method. Before removing a parent link, the child would also validate the parent reference before calling its parent remove method. Link: http://www.fltk.org/str.php?L1894 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
