Boost logo

Boost :

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.

thanks
GTJ

----- 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
> Peter
> > Dimov for the boost weak_ptr. Now there's not much to be gained trying
to
> > publish the article, ...
>
> Why not?
>
> [...]
> > So compared to the boost strong pointer/weak pointer combination, I see
> two
> > benefits:
> >
> > 1. The target objects can be allocated and managed in any way (static,
> > automatic, heap, etc...) because its destructor always does the right
> thing.
>
> 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
boost::shared_ptr
> > objects to maintain two reference counts, even if the user code does not
> use
> > the weak pointer facilities.
>
> Yes, you are right. Depending on the situation this might have an impact
on
> performance, especially in single threaded programs. You can use
> libs/smart_ptr/shared_ptr_timing_test.cpp to compare the new version
against
> the "traditional" smart_ptr.hpp implementation.
>
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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