Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-07-29 11:24:34

on Sun Jul 29 2007, <> wrote:

> Hi All,
> I studied the shared_ptr in the recent few days,
> and found that it uses a global reference count to determine
> when to delete the real pointer. The reference count is
> created by operator new.
> It is possible to remove the new operation by replacing
> the reference count with a linked list structure. All shared_ptr
> on the same real pointer should be linked in one list. Thus
> the length of the link list is actually the reference count.
> If a shared_ptr is destructed, it removes itself from the
> link list. And then if no other shared_ptr on the link list, it delete
> the real pointer.

Have you read ?

Dave Abrahams
Boost Consulting
The Astoria Seminar ==>

Boost list run by bdawes at, gregod at, cpdaniel at, john at