RE: Deriving from Gtk::ListStore



> 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]