25 Nov
2002
25 Nov
'02
9:01 p.m.
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