Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2002-04-19 16:58:02


"Fernando Cacciola" <fcacciola_at_[hidden]> wrote in message
news:a9q2vb$lbu$1_at_main.gmane.org...
> [...]
> So, I'm starting to think that Dietmar is right about having only
> shared_ptr<> (instead of both shared_ptr<> and intrusive_ptr<>).

The advantage of a separate intrusive_ptr<> is that you can use
whatever type of conforming count you like, whether that be deriving
from a counted_base or including the count directly. So, for instance,
I can create my own base class that does not support weak pointers,
if I don't want to pay for weak_ptr support. On the other hand, it
would then not be interoperable with shared_ptr. I don't particularly
like having to pay for weak_ptr support now (weak_ptr policy, anyone?),
but I guess if I must with shared_ptr anyway, a unified interface might
be better.

Dave


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