Re: [gtkmm] using RefPtr out of Gtkmm



On Wed, 2004-02-11 at 12:34, Chris Vine wrote:
> On Wednesday 11 February 2004 00:09, Chris Vine wrote:
> 
> > Incidentally, I see that the book/tutorial indicates that if a reference
> > counting shared pointer gets into the C++ standard, that will be used
> > instead of Glib::RefPtr.  Boost also has an intrusive pointer
> > (boost::intrusive_ptr) similar in effect to Glib:: RefPtr which I think has
> > also been submitted as an addition to the standard, and if it is accepted
> > it would be better to go for that, as it could then be plumbed into the
> > GTK+ object system (in particular, g_object_ref() and g_object_unref()) in
> > the same way that Glib::RefPtr is, rather than duplicating it.
> 
> On looking, I see that boost::intrusive_ptr was not submitted, only 
> boost::shared_ptr and boost::weak_ptr (Library Technical Report N1450, 
> http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1450.html ).  
> Glib::RefPtr may yet live on.

There is a glibmm patch in bugzilla that makes RefPtr use its own
reference counting instead of the GObject reference counting, so I'm
confident that we could use future standard C++ reference-counting
shared smartpointer.

-- 
Murray Cumming
www.murrayc.com
murrayc murrayc com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]