$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-11-12 11:20:29
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'