Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

img remove from dom and zero reference, but memory are still cached

$
0
0

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.


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>