Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One of the advantages of a tracing garbage collector is that it can recognize cycles. This means that if you have a few objects which point to each other, but the overall object graph is dead, a tracing GC should be able to collect these objects.

If you use reference counting in Rust, it will not be able to detect cycles. That said, it's not super easy to get a cycle accidentally.



Thank you. In hindsight, this was pretty obvious and I knew it already but I somehow didn't connect the pieces.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: