|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2001-05-26 21:10:36
----- Original Message -----
From: "Greg Colvin" <gcolvin_at_[hidden]>
>
> What you really want for C++ is to not call a destructor for
> an object until everything that object points to has been
> destroyed. But that is impossible if there are any cycles.
> Reference counting destroys in this order, which is a one of
> nice things about it. And reference counting won't collect
> cycles, which is one of the not-so-nice things about it.
Python, which until recently was strictly reference-counted (and thus leaked
all cycles that weren't explicitly broken), now has automatic garbage
collection of cycles. It appears to be fairly successful, although I think
that in general Python users may be a bit less demanding than C++ users. I
think that objects with destructors aren't collected at all, but am not
sure. I think that nothing is collected unless it can be proved that all
reference counts can be accounted for by a cycle. Anyway, interested parties
might look here for valuable information.
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk