Browser troubleshooting
Make a repeatable browser memory-leak check
Investigate a suspected leak with a repeatable action and comparable snapshots. Persistent growth after repeated create-and-remove cycles is more useful evidence than a single high memory reading.
Worked example
Worked reference example
Baseline: Open the page and let initial loading finish.
Cycle: Open and close the same panel ten times.
Compare: Take equivalent heap snapshots before and after the cycle.
Inspect: Follow retaining paths for objects that should have been removed.
Repeat: Verify the pattern with another cycle.How it works
A controlled cycle distinguishes expected cache warmup from objects retained on every repetition. Retaining paths can identify the reference keeping an object alive, such as a global array or event listener. Use small representative inputs so snapshots remain manageable.
Limits and mistakes
The exact tools differ by browser, and opening developer tools can itself change behavior. Snapshot timing and console references can affect what remains visible. Growth is a clue requiring investigation, not automatic proof that a particular library is defective.
Check the result
Document the action count, snapshot points, and retained object types. After a fix, repeat the same cycle and compare the same evidence rather than switching to an easier workload.
Sources
Reference documentation for the behavior used in this guide: