What is leaking memory with this use of getImageData, javascript, HTML5 canvas

前端 未结 2 1386
渐次进展
渐次进展 2021-01-14 09:10

I am working with the \'canvas\' element, and trying to do some pixel based manipulations of images with Javascript in FIrefox 4.

The following code leaks memory, an

2条回答
  •  一生所求
    2021-01-14 09:43

    Oh.. mistake. The memory lookes OK after few test.
    But there is another problem.
    The size of used memory by tab process is growing when changing the src property of img elements...

    Src property = canvas.getContext('2d').toDataURL('image/png') (changing each time);
    

    I've tried to "delete img.src", remove node...

提交回复
热议问题