Re: When and when not to use Glib::RefPtr?
- From: Murray Cumming <murrayc murrayc com>
- To: Matthias Kaeppler <nospam digitalraid com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: When and when not to use Glib::RefPtr?
- Date: Wed, 06 Apr 2005 14:42:12 +0200
On Tue, 2005-04-05 at 21:57 +0000, Matthias Kaeppler wrote:
> Hello,
>
> is there a general rule of thumb which classes require access through a
> Glib::RefPtr? For example, based on the gtkmm tutorial, a TreeModel is
> constructed directly, while a TreeView is handled through a RefPtr.
It's the other way around.
> What's the
> point?
Any gtkmm/glibmm class that has no public constructor, but which has
public static create() functions, can only be used via RefPtr. You have
no choice.
In general, stuff that derives from Glib::Object must be used via
RefPtr, apart from things that derive from Gtk::Object, which should not
be used via RefPtr.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]