|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-05-15 06:59:08
Jean-François Brouillet wrote:
> in http://www.boost.org/libs/smart_ptr/smarttests.htm
>
> there's a mention of a "cyclic" smart pointer implementation
> that dealt with cycles "using a dequeue". Is this available
> somewhere (I couldn't locate it in boost 1.32) ?
It is probably referring to Greg Colvin's cyclic_ptr. Just do a Google
search on cyclic_ptr and you'll be able to find several posts about it. The
thread starting at:
http://lists.boost.org/MailArchives/boost/msg47966.php
is a good summary (but read the followups as well as this post is not
entirely correct.)
I have another cycle collector that may be of interest - see the attached
file for a prototype. It is expensive, though; you should only use
reset_and_collect in places where cycles are known to occur. Best if you can
avoid cycles entirely (which might be difficult in a Java port). ;-)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net