2 ms·
Weak refs are a way to work around reference counting cycles, but cyclic garbage collection is a more complete solution and it's a core feature of nearly every
by hathawsh 7y ago
Weak refs are a way to work around reference counting cycles, but cyclic garbage collection is a more complete solution and it's a core feature of nearly every high level language.
https://www.php.net/manual/en/features.gc.collecting-cycles.php https://www.php.net/manual/en/features.gc.collecting-cycles....
It seems like people who often use Rust's Rc and Arc will long for some way to implement generic cyclic garbage collection. I don't yet see a way (other than unsafe code), but I may be missing something.