Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-04-30 11:49:27


"David Abrahams" <david.abrahams_at_[hidden]> wrote in message
news:048c01c1f051$2ede91c0$6401a8c0_at_boostconsulting.com...

> 1. Use traits to discover whether a type has an embedded reference count
> and what its type is. The default implementation of the traits use the
> access call get_shared_count(p) to determine whether the count is
> embedded. We provide char (& get_shared_count(...) )[MAX_ULONG] to help
> us distinguish when it's not implemented.

I do use traits class to choose ownership policy (intrusive or nonintrusive)
in shared_ptr generator. It could be made more smart though.

> 2. The default deleter function generated for a shared_ptr which does
> not have an internal count is responsible fro deleting the count object
> as well

> 3. The deleter function generated for a shared_ptr to an object with an
> internal count obviously doesn't do that.

The think is that custom deleter for storage policy have nothing to do with
ownership policy and vice vesa. (And we does not support none of them yet
;-)

> David Abrahams

Regards,

Gennadiy.


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