Re: Glib::RefPtr vs std::shared_ptr
- From: Daniel Boles <dboles src gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Glib::RefPtr vs std::shared_ptr
- Date: Sun, 27 May 2018 16:28:37 +0100
RefPtr in the current stable glibmm family is an intrusive refcounting smart pointer, i.e. it uses GObject refcounting.
In unstable, it is an alias to shared_ptr, so it uses a different layer of C++ refcounting instead of GObject.
As for which is better, I guess the above answers that too.
Btw, neither relates to Gtk::manage(), which is about letting containers manage the lifetime of their children, i.e. restoring the floating reference semantics that widgets have by default in GTK+ but not in gtkmm. RefPtr is not used with widgets.
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]