|
Boost : |
From: Bronek Kozicki (brok_at_[hidden])
Date: 2003-12-29 15:04:33
AlisdairM <alisdair.meredith_at_[hidden]> wrote:
> How would shared_ptr release() a pointer shared with 3 other
> shared_ptrs?
It's OK for me if release() works only for unique pointer, throwing
exception in any other case. Second option is to simply reset counter to
0, thus preventing deletion in all copies (counter is shared), third
option is to store actual pointer together with shared counter (and set
it to 0 together with counter).
B.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk