Boost logo

Boost Users :

From: Hickman, Greg (greg.hickman_at_[hidden])
Date: 2002-11-25 16:01:28


I need an object managed through a shared_ptr to be able to pass itself
(i.e., this) to another object which also expects a shared_ptr. Is there a
preferred implementation technique for this when using the boost smart
pointers?

I think I've seen conversation in the past about deriving from
boost::counted_base and calling shared_from_this(), but I think I also
remember seeing comments to the effect that this is going away. OTOH, I
know there's something called intrusive_ptr that's currently undocumented.

Should I be using one of these approaches? If the answer is intrusive_ptr,
are there docs? Should I roll my own? What's a Booster to do?

-Greg


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net