Boost logo

Boost :

From: Gregory Colvin (gregory.colvin_at_[hidden])
Date: 2003-05-29 10:36:48


On Thursday, May 29, 2003, at 08:45 America/Denver, Chuck Messenger
wrote:
...
> And so, sp_collector suffers the same problem as shared_cyclic_ptr,
> and requires the same remedy: that is, it is necessary to be able to
> "tag" a container as being one which might hold "internal"
> shared_ptr's.
>
> Any interest in modifying shared_ptr to support something like this?

Yes, but I haven't had time since my cyclic_ptr work.

It seems that rather than take the route of modifying all the
standard containers one might as well just provide a special
operator new(gc) and gc_allocator that can track all the memory
blocks on the heap that might contain a shared_ptr. Then one
can either replace global operator new with the special one,
or use new(gc) or gc_allocator wherever needed.


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