var fragment = getCopyOfNode(req.responseXML.documentElement.firstChild);
var img = fragment.getElementsByTagName('img')[0];
img.onload = function(evt) {
- var preview = slide.getElementsByTagName('img')[0];
- preview.src = undefined;
+ // accelerate GC before replacing
+ slide.img.src = '';
+ slide.img.parentNode.removeChild(slide.img);
+ slide.img = undefined;
slide.parentNode.replaceChild(fragment, slide);
};
this.previewsLoaded--;