A little background
I’m developing a large-scale JS app with ExtJS3. At runtime, the user may open and close numerous widgets, thus possibly increasing memory usage. I fixed many memory holes using Chrome’s heap analyzer, but in certain cases I just can’t find the culprit. The heap analyzer shows something like GCRoot[1234]->store.items, and I can’t find the code section where the store would be referenced.
The question
What’s the exact runtime conditons under which V8 (or any other JS engine) would create a new garbage collector root? Are there certain code patterns (closure, eval, event listetes, …) that force it?
via http://zetafleet.com/blog/google-chromes-heap-profiler-and-memory-timeline
via http://code.google.com/chrome/devtools/docs/heap-profiling.html