Re: [[gtkmm] Destructor not called...]



On Mon, 14 Oct 2002 14:30:56 +0100
Murray Cumming <murrayc usa net> wrote:

> Daniel Sundberg <dss home se> wrote:
> > Hello
> > 
> > Today I came across a strange problem. An example program that illustrates
> the problem is attached to this mail. If you compile and run the program the
> destructor in MyFrame is not called when the widgets are deleted using 
> > 
> > vbox1.children().erase(vbox1.children().begin(), vbox1.children().end());
> 
> Why do you expect them to be deleted? manage() causes child widgets to be
> deleted when their containers are deleted. But they are no longer child
> widgets if you remove them from the container.

Simply because the dtor gets called when I try the same with gtkmm-1.3.23. 

And why does the dtor get called when the contents of the vbox is "declared" as a Gtk::Button* instead of a Gtk::Button (see test2.cc in my original post).

Daniel Sundberg
dss home se
http://gspeakers.sf.net

> 
> Murray Cumming
> murrayc usa net
> www.murrayc.com
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]