(no title)
neetodavid | 5 years ago
I was debugging memory leaks in some pretty large javascript products and while I did initially start with methods like this post, I only started to make reliable progress when I became familiar with the heap snapshot tool. Diagnosing problem is trivial (just filter the heap snapshot by a Class name and count the instances) and it is The Tool To Use to actually resolve it (tracing the chain of references in the retainers view)
In the future if I need to write automated tests to identify memory leaks I will look into automating the Dev Tools rather than fumbling with WeakMap or performance.memory.usedJSHeapSize
hoten|5 years ago
hoten|5 years ago
I left some annotations in a comment. Hope it helps!
gargarplex|5 years ago
iaml|5 years ago
londons_explore|5 years ago
The API is documented here:. https://chromedevtools.github.io/devtools-protocol/
Sophistifunk|5 years ago
darepublic|5 years ago