Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-14 10:36:50

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>

> As for release(), I think that it needs to be dropped.

It, or something like it, can be crucial when interfacing to legacy code.
I'd like to at least have its availability be parameterizable. You can even
do something reasonably intelligent if you are keeping a copy of the derived
pointer in the count object, for a few extra cycles: like a weak ptr all
copies of the shared_ptr will now be false when evaluated as a boolean

I'm beginning to really like the idea that this should be at least
available. There are so many real-world needs that a shared_ptr's inability
to give up ownership prevents it from serving. For example, suppose you need
to stick dynamically-allocated objects in a container and then pass
ownership off to some code which uses real pointers? Although dangerous, the
facility (especially if it is reflected by the pointer's copies) has
tremendous power.


Boost list run by bdawes at, gregod at, cpdaniel at, john at