Re: [C++]Use Glib::RefPtr<> with my own classes ?
- From: John McDonald <jmcdonald fairfieldnodal com>
- To: "'gtkmm-list gnome org'" <gtkmm-list gnome org>
- Subject: Re: [C++]Use Glib::RefPtr<> with my own classes ?
- Date: Mon, 2 Aug 2010 08:25:42 -0500
Chris is right that it's not too hard to make your own intrusive reference counting shared pointer, but if I might, I'd suggest that you look at the shared_ptr from the Boost libraries (www.boost.org). The Boost libraries contain much of the stuff that is being considered for inclusion in the next C++ language revision, and the smart pointers are one of those items.
John
John McDonald
Sr. Software Engineer
Systems Division
1111 Gillingham Lane
Sugar Land, TX 77478
281.275.7608 d
jmcdonald FairfieldNodal com
www.FairfieldNodal.com
Click here for contact information-----Original Message-----
> . . .
> It is trivial to make a conventional intrusive pointer, which expects new objects to have a count of 0 and which does
> increment the reference count in the constructor taking a pointer. I suggest you do it that way.
>
> Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]