Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-05-26 18:20:27


From: John Max Skaller <skaller_at_[hidden]>
> Greg Colvin wrote:
> >
> I've had a look at Gregs cyclic_ptr system.

Thank you.

> This is a nice system. The main advantage is ease
> of use: unlike Felix GC, there are no shape objects,
> since the cyclic_ptr itself records where pointers are.
>
> The technique is also partly non-invasive: you can
> collect any type T, but if T has pointers to collectable
> objects, they need to be cyclic_ptrs.

And there is a subtle constraint on operator=, which I
regret.

It would be a good thing if the C++ runtime could
provide something like shape objects automatically.
Garbage collectors and serialization tools would then
be much easier to write.

> The main disadvantages seem to be that the collector
> is global (which could be fixed by passing a second
> argument along with each raw pointer?).

It could be, but see my response to you and Bjarne on
another thread.


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