On Tuesday, 8 November 2016 at 05:36:22 UTC, Era Scarecrow wrote:

Hmmm.. I had the impression that if something was referenced by another object, then it couldn't be collected,

Another *live* object, i.e. reachable from globals and stack.
If you have a big tree and it becomes unreachable (you only had a pointer to its root and you nulled it), then this whole tree becomes garbage, and its nodes and leafs will be collected in unpredictable order, with destructors being run in unpredictable order, even when these dead nodes reference each other.


Reply via email to