Boost logo

Boost :

From: Frank Mori Hess (fmhess_at_[hidden])
Date: 2008-03-25 19:55:21


I just want to point out that even with the fix that went in today, the
behavior of enable_shared_from_this::shared_from_this when multiple
shared_ptrs take independent ownership is inconsistent with the old
behavior. The old behavior was that shared_from_this would return a
shared_ptr that shared ownership with whichever shared_ptr took ownership
of the object last. The new behavior is shared_from_this always returns a
shared_ptr that shares ownership with the first shared_ptr to take
ownership of the object. The attached example illustrates the difference
when compiled against the old lib and svn trunk.

I don't want to make a big deal of this, as I actually think the new
behavior is more sane, but I thought I should point it out. My preferred
solution would be to just point out the change in the next release notes
or something like that.

-- 
Frank





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk