
31 Mar
2014
31 Mar
'14
5:25 p.m.
2014-03-31 17:15 GMT+02:00 Markus Engel <p637777@...1081...>:
Hi, some more thoughts: Aren't widgets usually stored in Glib::RefPtrs? You can't use them because the compiler needs the full definition of the classes you use as template type parameters, doesn't it? How does this affect speed and memory usage?
For Gtk::Widget, the memory management model is a bit different. You can put them in RefPtr, but this is not recommended. A more common way is to use raw pointers obtained from "new" and Gtk::manage(), which marks a widget to be deleted when its parent is deleted. This function can be called before the widget is added to a container.
Regards, Krzysztof