Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2003-02-05 12:58:43


"Pavel Vasiliev" <pavel_at_[hidden]> wrote in message
news:1111364312.20030205192141_at_mpen.bas-net.by...
> [...]
> In my implementation of refc_ptr operator= performs
> incrementing/decrementing within a single guarded section (since
> the only global instance of interl. op. mutex is used for all
> cases). So the copying via operator= is about twice faster in my
> implementation. I do not know how to achieve this with
> Loki::SmartPtr.
>
> The true locking/unlocking, not InterlockedIncrement/Decrement()
> even if availabe, is necessary to support weak references.
> [...]

Well, this is a good point, and is worthy of study at some point.

Dave


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