IE6 memory leak - very fiddly

T

Thomas 'PointedEars' Lahn

Daniel said:
Thomas said:
Chances are that Prototype.js uses document.links or a similar NodeList
in a closure and adds event listeners with scripting. The uncleaned
circular references to the NodeList or an element of that list would
leak memory in IE. That effect could then only be observed if the
event target results in an element of such a NodeList, i.e. if you make
that possible by adding the `href' attribute.

This is nothing but conjecture, of course. Only a look at the source
code can provide a definitive answer. [...]

[...] Your explanation seems to indicate that when the tag in question is
a link, that something in the library might add an event to the
document.links list, and that event would leak. However, I'm seeing the
opposite - when the tag is a link, it *doesn't* leak. It's only when it
isn't a link that the leak occurs.

There is nothing that could prevent Prototype.js from handling the opposite
case. Maybe in order to fix these "links" with scripting; who knows.
Something else occurred to me, too... doesn't IE6 have a document.all
NodeList in any case?

Yes; that is even implemented as a collection and a method.
So why would it matter if it's a link or not?

Probably it matters more here if it isn't.
I double-checked the Prototype source code and the word "link" doesn't
occur anywhere inside it, so it isn't doing anything with document.links
(and neither am I)...

Tough luck. But as I mentioned before, there are several ways to make
references to element objects.

Unfortunately, I'm not very much inclined to dig through Prototype.js or
code that uses it. At least not for free, as that would mean sacrificing my
sparse leisure-time in order to support junk.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top