- Generations: young pool
- Becomes old when the pool run out of memory
- Garbage: objects that cannot be referenced by the root
- Better not do any
new
in per-frame operations
- A few tips
- Incognito window to avoid interference from extensions
- Ignore dimmed and parenthesed stuff in heap snapshot
- GC takes place before taking snapshot
- Paterns
- Sign of memory leak: you click the GC button, and the memory usage still stays up
- Compare snapshots before and after some operation, and pay attention to the number of deleted objects -- if they are not deleted as you expected, you got a leak.
- Normal background = not yellow = cannot be acessed from JS handles -- though you might be able to access them by walking the DOM
- Red = in detached DOM, cannot be accessed by walking the DOM
- Pay attention to event handlers
- Gotchas
- The integer tagging of V8 might make some intergers invisible in the containment graph(should have been references/pointers, but V8 turns them into memories storing integers)
- Sometimes things disapper in the heap snapshot beacause their getters are very expensive to call
MS Edge