I tried this in IE. Create a uploadify control (flash version) and destroy it, do these again and again. But it seems that the memory allcated doesn't release after method destroy called.
libs
<script src="Scripts/jquery-3.1.1.js"></script>
<link href="uploadify/uploadify.css" rel="stylesheet" />
<script src="uploadify/jquery.uploadify.js"></script>
html
<button id="btnAdd">add</button>
<button id="btnRemoveLast">remove last</button>
<div id="container">
<!--we will place uploadifies here-->
</div>
js
<script>
$(function () {
$('#btnAdd').click(function () {
add();
});
$('#btnRemoveLast').click(function () {
removeLast();
});
var count = 0;
function removeLast() {
if (count > 0) {
$('#uploadify' + --count).uploadify('destroy');
}
}
function add() {
var elem = $('<div id="uploadify' + count++ + '"></div>');
$('#container').append(elem);
elem.uploadify({
height: 30,
swf: '/uploadify/uploadify.swf',
width: 120
});
}
});
</script>
Any answers will be appreciated, and thank you for pardoning my English:)
Looks like another IE "fun". If the problem is the the same for the problem that I know, nullify will be the answer. In IE there is a bug with the GC, so you need to "release" yourself references and scope variables.
Try this: