From: Gregory Trent Jenkins (gtjenkins_at_[hidden])
Date: 2002-03-19 09:08:58
how to I unsubscribe? I just want to read these messages from the web.
----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: "Boost List" <boost_at_[hidden]>
Sent: Tuesday, March 19, 2002 7:01 AM
Subject: Re: [boost] Possible alternative weak_ptr implementation
> From: "Raoul Gough" <raoulgough_at_[hidden]>
> > I have recently been working on a magazine article about a smart weak
> > pointer implementation, without being aware of the work being done by
> > Dimov for the boost weak_ptr. Now there's not much to be gained trying
> > publish the article, ...
> Why not?
> > So compared to the boost strong pointer/weak pointer combination, I see
> > benefits:
> > 1. The target objects can be allocated and managed in any way (static,
> > automatic, heap, etc...) because its destructor always does the right
> Note that boost::shared_ptr supports custom allocations, too.
> > 2. It does not impact code which uses shared_ptr but not weak_ptr
> > As I understand it, the new boost:weak_ptr requires all
> > objects to maintain two reference counts, even if the user code does not
> > the weak pointer facilities.
> Yes, you are right. Depending on the situation this might have an impact
> performance, especially in single threaded programs. You can use
> libs/smart_ptr/shared_ptr_timing_test.cpp to compare the new version
> the "traditional" smart_ptr.hpp implementation.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk