RE: Deriving from Gtk::ListStore
- From: "Murray Cumming" <murrayc murrayc com>
- To: "Foster, Gareth" <gareth foster siemens com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: RE: Deriving from Gtk::ListStore
- Date: Fri, 26 Nov 2004 10:57:10 +0100 (CET)
> Sorry mate,
>
> I was asking why it was that the 'create' mechanism you use is needed -
> out
> of interest,
Because classes that are used via RefPtr<> should never be used without
RefPtr<>, because they must be reference-counted, because their memory
management depends on this. By making the constructor protected, we
prevent you from ever getting, for instance, a bare Gtk::TreeModel*. So,
because you have no constructor, you need some other way to instantiate a
TreeModel. The API forces you to do the right thing.
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]