logo       

Is intrusive_ptr the thing to use?: msg#00281

lib.boost.user

Subject: Is intrusive_ptr the thing to use?

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

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe@xxxxxxxxxxxxxxx>


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise