Which widgets require a RefPtr



Reading the documentation here:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-memory-shared-resources.html

It says that "some" objects need the RefPtr, and indeed looking at the
code it would seem that some Gtk:: objects do use RefPtr, where others
are naked (presumably left up to me to decide what to do with their
memory).
Ex:    Gtk::VBox packingbox_;
        Glib::RefPtr<Gtk::UIManager> uimanager_;
        Glib::RefPtr<Gtk::ActionGroup> actiongroup_;

Is there a canonical list of which widgets do and don't?

I would appear that Glib::ObjectBase defines reference(), so does that
mean that all derived objects should go through RefPtr?

Cheers,


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