|
Boost : |
From: James Kanze (kanze_at_[hidden])
Date: 2002-04-08 01:17:36
"Richard Damon \(E-mail\)" <RDamon_at_[hidden]> writes:
|> 2) You need a much smarter shared_ptr that can reconnect to other
|> copies from the stored pointer, and if there is none to remember
|> that it does not own it. A normal shared_ptr will not be smart
|> enough to do this due to the overhead that will be added, as it
|> requires the keeping of a map of some sort of values under
|> controlled by all shared_ptrs in the program.
I'm not quite sure what you mean by the first sentence. In general, to
be useful, you must be able to create a smart pointer from a raw pointer
multiple times (or find some way of making "this" a smart pointer). The
current boost::shared_ptr doesn't support this, but it is the only
implementation of reference counted pointers I have encountered that
doesn't.
-- James Kanze mailto:kanze_at_[hidden] Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung Ziegelhüttenweg 17a, 60598 Frankfurt, Germany Tel. +49(0)179 2607481
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk