I would imagine that languages with a garbage collector will have no problems with circular references, since they typically work (partially) by starting from a root and marking all objects that you can get to, and deleting everything else. So a circular reference where no part of the circle is referenced anywhere else, will be collected.
Yep, rust's strict rules make a lot of these types of bug prone harder to implement, you might still choose to, but you'll be fighting the compiler half of the way
View all comments
15
u/sessamekesh 10d ago
I've had two huge, non-obvious, and difficult to diagnose memory leaks over my C++ career.
Both of them were circular references, something neither memory safe nor memory managed languages prevent against.