|
Boost : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2003-11-15 18:44:36
On 11/15/2003 01:48 PM, Philippe A. Bouchard wrote:
> Larry Evans wrote:
[snip]
>>requires synchronization for decrement of reference count.
>>The cost is extra memory in the pointers.
>
>
> Is this a "probabilistic" solution or will it always work?
>
AFAICT, it'll always work. This is because instead of accessing
the pointee, only the smart pointer is accessed. I'm assuming that
the smart pointers are in the same thread; hence, there's no need
to synchronize. Only when a smart pointer is destroyed does
the pointee need to be accessed.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk