Re: [C++]Use Glib::RefPtr<> with my own classes ?

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 (  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 McDonald
Sr. Software Engineer
Systems Division
1111 Gillingham Lane
Sugar Land, TX 77478
281.275.7608 d
jmcdonald 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]