X-Git-Url: https://scm.cri.mines-paristech.fr/git/Portfolio.git/blobdiff_plain/4ca5ee4768f8de63b994ef6d7cedb35a6643442a..5cfa4a0efeccd0ced89914a9c85ef19bdc59b536:/skins/fileupload.js?ds=sidebyside diff --git a/skins/fileupload.js b/skins/fileupload.js index 2b6c4a8..c202bfe 100644 --- a/skins/fileupload.js +++ b/skins/fileupload.js @@ -93,6 +93,10 @@ DDFileUploader.prototype.uploadCompleteHandler = function(req) { var fragment = getCopyOfNode(req.responseXML.documentElement.firstChild); var img = fragment.getElementsByTagName('img')[0]; img.onload = function(evt) { + // accelerate GC before replacing + slide.img.src = ''; + slide.img.parentNode.removeChild(slide.img); + slide.img = undefined; slide.parentNode.replaceChild(fragment, slide); }; this.previewsLoaded--;