in reply to Re: Why bother with the mark and sweep garbage collection on non-embedded interpreter shutdown?
in thread Why bother with the mark and sweep garbage collection on non-embedded interpreter shutdown?

DESTROY methods are certainly a sufficient reason, at least in cases where they have to be called in a certain order (assuming that the M&S produces a tree of referenced nodes as a side effect, so the roots can be DESTROYed first and pass that along to leaves). If they don't need a certain order, I think just the sweep would do it.

Any other known rationales I had imagined that the reason we'd have to do the gc at the end _would_ be somehow related to memory resource freeing.

Anyway, thank you for your answer.

  • Comment on Re^2: Why bother with the mark and sweep garbage collection on non-embedded interpreter shutdown?