Subject: Re: [boost] enable_shared_from_this2
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-10-28 22:00:18
On Wed, Oct 28, 2009 at 6:45 PM, Peter Dimov <pdimov_at_[hidden]> wrote:
> Frank Mori Hess wrote:
>> I've commited boost/smart_ptr/enabled_shared_from_raw.hpp to trunk (I svn
>> moved enable_shared_from_this2.hpp).
> So long as we're innovating, consider adding weak_from_raw as well. It can
> give you an expired weak_ptr to 'this' from within a destructor, which is
> useful for deregistration.
Or you can use a factory function for registration and a deleter for
deregistration. That way the object registry is not coupled with T.
Reverge Studios, Inc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk