Live data from Hacker News

MemLab: An open source framework for finding JavaScript memory leaks

engineering.fb.com

11–15 of 15 posts

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

#12
post #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.

Very good explanation. I always wondered what is the equivalent of memory leak in a garbage collected language. Are there any tools for this?

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

#14
post #5

Earlier quoted context omitted.

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.

Very good explanation. I always wondered what is the equivalent of memory leak in a garbage collected language. Are there any tools for this?

Well, there’s the one in the article. Usually each GC implementation comes with its own tools.

You can watch process memory in general and see if keeps going up; if it does, it’s someone’s fault.

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

#15
post #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.

That's awesome. Thanks for sharing!
Post reply on HN