If there is any memory leaks in a garbage-collected language, isn't it a bug of V8 instead?
MemLab: An open source framework for finding JavaScript memory leaks
11–15 of 15 posts
Re: MemLab: An open source framework for finding JavaScript memory leaks
#12If 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
#13Re: MemLab: An open source framework for finding JavaScript memory leaks
#14Earlier 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?
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
#15its 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.