When using Glib::RefPtr<> and when Pointer?
- From: Andreas Volz <lists brachttal net>
- To: gtkmm-list gnome org
- Subject: When using Glib::RefPtr<> and when Pointer?
- Date: Mon, 20 Apr 2009 23:13:27 +0200
Hello,
I'm a little confused about the Glib::RefPtr<> usage in gtkmm.
For some returns are used smart pointers and for some normal pointers.
e.g.:
Gtk::ComboBox:
Glib::RefPtr<TreeModel> get_model ()
but
Gtk::Bin:
Widget* get_child ()
So why is a smart pointer used for get_model(), but not for
get_child(). Is there a reason behind? Could someone please explain
this?
There are a lot more examples in Gtkmm like this.
regards
Andreas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]