使用萤火虫在 JavaScript 中查找内存泄漏?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5028479/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 15:43:34  来源:igfitidea点击:

Finding memory leaks in JavaScript using firebug?

javascriptjqueryfirefoxfirebug

提问by cometta

Are there any add-ons for Firefox that I can use to find out with part of the JavaScript causes memory leaks?

是否有任何适用于 Firefox 的附加组件可以用来找出部分 JavaScript 导致内存泄漏?

采纳答案by xzyfer

I've got nothing for firefox, but the webkit inspector in Chrome has a profiler built in that is great for that kind of thing.

我对 Firefox 一无所知,但 Chrome 中的 webkit 检查器内置了一个分析器,非常适合这种事情。

As an added bonus it also shows you all browser events such as repaints, so you can engineer your code to have the least impact on the browser.

作为一个额外的好处,它还会向您显示所有浏览器事件,例如重绘,因此您可以设计代码以将对浏览器的影响最小。

回答by powtac

Use Drip.exe/ IEleak, I used it a lot to search for memory leaks!

使用Drip.exe/ IEleak,我经常用它来搜索内存泄漏!

Other hits:

其他热门歌曲:

回答by Jakub Konecki

The best memory profiler I've found is for IE (supports even IE6 ;-). Give it a go - you will be surprised how good it is:

我发现的最好的内存分析器适用于 IE(甚至支持 IE6 ;-)。试一试 - 你会惊讶它有多好:

http://ajax.dynatrace.com/ajax/en/

http://ajax.dynatrace.com/ajax/en/