Reference Cycle Handling
Cluster focuses on challenges of cyclic references in reference counting memory management, solutions like weak references, cycle detection, and comparisons to garbage collection in languages such as Rust and Java.
Activity Over Time
Top Contributors
Keywords
Sample Comments
How do you deal with cycles in reference counting?
Ref counting doesn’t work for cyclic data structures
Sure it does. Make the backreferences weak, or use a library that provides cycle detection (or even full-on tracing GC if you really want).
Circular reference does not leak memory if your using a proper GC
But doubly linked lists use cyclic references…
It has optional cycle detection, yep. But... you could also just spend a couple of minutes to not have cyclic references.
Hi. How is cyclic references handled? One of the maintainers said it would be removed and made not possible.Also garbage collection. What are you doing for that? ARC?
How does Rust deal with reference cycles?
Circular references are not an issue, the GC is more than just reference counting.
I think you can leak memory by having cycles.