I've some news.

The nightly of jquery is not changed in this part (.html())

In the trunk, some changes are done by resig, that resolve the problem
for the .html method, using innerhtml.
So, the clock example is now not leaking at all.

But the .remove methond continue with this:
element.parentNode.removeChild(element), that does not remove the
leaking node in ie7.

I think this is better:

                        var garbage = document.getElementById("garbage");
                        if (!garbage) {
                                garbage = document.createElement("div");
                                garbage.setAttribute("id", "garbage");
                                document.body.appendChild(garbage);
                        }
                        garbage.appendChild(this);
                        garbage.innerHTML = "";

What do you think? It's not better to use a generic GC in jquery for
dom elements?
this solve the problem in ie7.

Again, inserting a node into body, using DBJ way does not change
anithing, but in the trunk version the leaks are reduced.

Each time i insert a div node into body, it create 2 nodes into the
dom instead of 1. with garbage code in the remove method,
only one is correctly removed from memory, leaving only one leaking
element.

I hope Mr. Resig can read this post, because he is working on this
recently.


Reply via email to