Boost logo

Boost :

Subject: Re: [boost] [shifted_ptr] Status
From: Phil Bouchard (philippe_at_[hidden])
Date: 2009-08-20 15:19:50


"Mathias Gaunard" <mathias.gaunard_at_[hidden]> wrote in message
news:h6jj2p$d46$1_at_ger.gmane.org...
>
> So basically you're saying you invented a new garbage collecting scheme
> that handles cyclic references and that doesn't have some of the problems
> of mark and sweep.

Indeed but I call it a "real-time object destructor" because, as its name
stands, the destruction is immediate and not postponed.

> A high-level explanation of how the scheme works, its semantics, and
> performance considerations would be useful.

The benchmarks aren't present in the repository but it is actually twice as
fast when object are repeateadly allocated and deallocated.

> I see you're calling destructors, which you probably shouldn't. Indeed,
> the fact you support cyclic references means that there is no order in
> which to call the destructors to satisfy that every other object an object
> references is alive in its destructor.
> This is the reason why not supporting cyclic references is actually a good
> thing, since otherwise the scheme is only applicable to PODs.

I think the order of destruction is the exact opposite of their construction
when the objects have no relation between each other, just like a stack.

Thanks for the specifications, I will document the layers.

Regards,
-Phil


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