【发布时间】:2014-02-14 18:10:52
【问题描述】:
我遇到了一些奇怪的行为。当我有一个带有视频标签的页面并随后动态创建一个 jquery ui 元素时,chrome-dev-tools 会在时间线视图中向我显示内存泄漏,每次我创建(然后销毁该元素)。 its tested with ui - button and ui - dialog so far. when i remove the source of the video tag, the leak doesnt 出现。有人有想法吗?非常感谢。
我也在这里创建它用于测试目的:http://jsfiddle.net/2P8Eh/
非常感谢您的回答。我刚刚意识到在测试 lokal 时使用 jsfiddle 进行测试会给我不同的结果(我猜它s because of the iframe, where they running the code). anyway i considerd your solutions, but they dont 解决了内存泄漏问题。我附上了一张图片,我在其中创建、销毁、创建、销毁......元素并放置之后是 chrome-dev 中的 gc 按钮:
【问题讨论】:
标签: javascript jquery user-interface memory-leaks