Live data from Hacker News

MemLab: An open source framework for finding JavaScript memory leaks

engineering.fb.com

1–10 of 15 posts

Re: MemLab: An open source framework for finding JavaScript memory leaks

#5
post #4

If there is any memory leaks in a garbage-collected language, isn't it a bug of V8 instead?

You can just leak memory by leaving references to it around. Sometimes called memory abandonment.

With some systems you can pin it and forget to unpin it.

Re: MemLab: An open source framework for finding JavaScript memory leaks

#8
post #6

Memory leak because of console.log? Wow, news to me. Not that I really ever use it for much since I believe in writing unit tests over outputting logs to the console. But I can see how others might get bitten by this for sure.

Can confirm, have been bitten in production. Therefore we have a lint rule that disallows `console.log` for production builds.

Re: MemLab: An open source framework for finding JavaScript memory leaks

#9
post #7

its incredibly difficult to debug memory leak even with dev tools, I will look into this and hope it helps

I learned recently that Edge has a "Detached Elements" panel that identifies leaked DOM elements and the code / object holding the reference.

It basically automates the process of diff'ing heap snapshots.

Post reply on HN