I've found that all of these scripts, while doing the same thing create memory leaks ist die Frage, warum?Kreisreferenzen in IE6 Speicherlecks erstellen
Es scheint, dass es wegen der Zirkelverweise ist.
<script>
function runme() {
var node = document.createElement("div");
node.onclick = function() {
node.style.background = "red";
}
document.body.appendChild(node);
}
</script>
oder
<script>
function runme() {
var node = document.createElement("div");
node.onclick = function() {}
document.body.appendChild(node);
}
</script>
oder
<script>
var node = document.createElement("div");
document.body.appendChild(node);
function runme() {
node.onclick = function() {}
}
</script>
oder
<script>
var node = document.createElement("div");
node.onclick = empty;
document.body.appendChild(node);
function empty() {
}
</script>
Was haben Sie bisher entdeckt? – dldnh
IE6? IE6 ?! ** IE6?!?! ** –
Ich habe festgestellt, dass alle von ihnen tun. Aber ich weiß nicht warum. –