
12 Nov
2004
12 Nov
'04
4:20 p.m.
On Fri, Nov 12, 2004 at 04:50:51PM +0100, Dirk Gregorius wrote:
Is it possible to reset a boost::shared_ptr without all associated boost::weak_ptr become invalid?
AFAIK only by making another shared_ptr own the pointer. The weak_ptr becomes invalid if _no_ shared_ptr owns its pointer, but as long as one or more shared_ptrs still refer to the pointee the weak_ptr is valid. jon -- "Everything is permitted." - Fyodor Dostoyevsky, 'The Brothers Karamazov'