Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 1999-07-27 21:07:54


> Please kind sirs,
> Can you tell me why the reference count is a pointer to a long? Why not
> just use a long?

briefly:
if you store the reference count in the counted_pointer, you have one count
per pointer instead of one count per object being pointed to (which won't
work)

if you store it in the object being pointed to, it is intrusive and requires
that the object be written in terms of reference counting.


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