I try to generate thumbnail with HTML5 canvas
I use img to load and draw to canvas
function createThumbnail(url){var img =newImage(); img.onload =function(){var context = canvas.getContext('2d'); context.drawImage(...); context = img =null;} img.src = url;}
but some how i found that even i have set the img = null, but the memory usage (monitor in task manager) are keep growing.
when i rapidly call the createThumbnail method the memory usage are growing and finally "Not enough available storage to complete this operation" will throw at the line where img.src = url
at this point memory usage are 1gb+
I have try to reuse img object but still same.
this is happen on IE10 (8,9 not tested) but no Chrome and Opera
Any idea?
Thank you very much.