【发布时间】:2016-06-15 02:21:23
【问题描述】:
当在 Window 7 的 chrome 浏览器中循环使用从画布中获取数据时,我在 getImageData()[api 提供的 javascript] 上遇到内存泄漏问题,它会在 getImageData() api 上的每次旅行中增加 chrome 内存,所以一段时间后,默认 chrome 内存已满,如果有人知道任何解决方法,请提出建议。
使用的代码:
this.surface.drawImage(this.st1, 0, 0, this.canvas.width, this.canvas.height);
var data = this.surface.getImageData(0,0, this.canvas.width,
this.canvas.height);
this.timer = setTimeout(this.paint, 500);
【问题讨论】:
标签: javascript google-chrome google-chrome-app