Search code examples
garbage-collectionspidermonkey

SpiderMonkey garbage collector


If SM's GC is a conservative stack scanner, why is the example 3 "bad"? Why is "root as you go" necessary? The GC should scan the stack and observe that str1, str2 are roots, no?


Solution

  • You need to get your timeline straight.

    In other words: you found a piece of very outdated documentation. Indeed, the tags at the bottom say: NeedsEditorialReview, NeedsTechnicalReview. Not something that you should rely on.