Re: [glade--] Could raw C++ pointers be eliminated?



>>>Christof Petig schrieb:
> If you use member variables, you cannot hide internal widgets from the
> class definition and put them locally into the ctor. [The pimpl idiom
> might help here]

OK. I read "ctor local variables" as "member variables", which was silly
of me.

>>>Concerning smart pointers: The gtkmm infrastructure needs to work well
>>>first.
>>
>>
>> Specifically?
>
> Last I heard was that using Glib::RefPtrs on widgets was not advisable
> since ref counting was difficult to design correctly with widgets (due
> to the underlying gtk+ library ignoring pending references on
> destruction IIRC). [That was the state back during the meeting in
> Berlin, has this changed?]

Yes, RefPtr<> is not a general purpose smartpointer. But there are plenty
of other general purpose smartpointers that can be used with gtkmm.

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]