From 3ebc315ad21eb626b3e2d7eccd46c0cb76031246 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 8 Feb 2009 17:26:02 +0000 Subject: Documentation updates, in parts concerning changes done for STR #1894. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6652 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Group.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx index 891e0cce8..8eaa81b93 100644 --- a/src/Fl_Group.cxx +++ b/src/Fl_Group.cxx @@ -405,10 +405,16 @@ void Fl_Group::clear() { /** The destructor also deletes all the children. This allows a whole tree to be deleted at once, without having to keep a pointer to - all the children in the user code. A kludge has been done so the - Fl_Group and all of it's children can be automatic (local) - variables, but you must declare the Fl_Group first, so - that it is destroyed last. + all the children in the user code. + + It is allowed that the Fl_Group and all of its children are automatic + (local) variables, but you must declare the Fl_Group \e first, so that + it is destroyed last. + + If you add static or automatic (local) variables to an Fl_Group, then it + is your responsibility to remove (or delete) all such static or automatic + child widgets \e \b before destroying the group - otherwise the child + widgets' destructors would be called twice! */ Fl_Group::~Fl_Group() { clear(); @@ -416,7 +422,7 @@ Fl_Group::~Fl_Group() { /** The widget is removed from its current group (if any) and then - inserted into this group. It is put at index n (or at the end + inserted into this group. It is put at index n - or at the end, if n >= children(). This can also be used to rearrange the widgets inside a group. */ -- cgit v1.2.3