谷歌浏览器和(缓存或内存泄漏)

时间:2010-05-31 14:10:19

标签: javascript caching memory-leaks google-chrome

Google Chrome及其内存存在很大问题。我的应用程序向用户显示多个图像图表并每10秒重新加载一次。

在区间我有这样的代码

var image = new Image();
var src = 'myurl/image'+new Date().getTime();
image.onload = function() {
    document.getElementById('myimage').src = src;
    image.onload = image.onabort = image.onerror = null;
}
image.src = src;

所以我在Firefox和IE中没有内存泄漏。

此处是图片的响应标题

Server Apache-Coyote/1.1
Vary * 
Cache-Control no-store (// I try no-cache, must-revalidate and so on here)
Content-Type image/png
Content-Length 11131
Date Mon, 31 May 2010 14:00:28 GMT

Vary *取自here
在about:缓存页面中没有我的缓存图像。

如果我为chrome(--purge-memory-button参数)启用了purge-memory-button,那就无济于事了。

图片位于PNG24。

所以我认为问题不在缓存中 可能是谷歌浏览器没有为旧图像发布内存。

请帮忙。有什么建议。 感谢。

更新的 似乎是固定的http://code.google.com/p/chromium/issues/detail?id=36142

1 个答案:

答案 0 :(得分:3)

我在铬虫追踪器here中发现了一个问题,因此它可能是一个google-chrome bug。

修改

问题已经解决