Re: IE6 memory leak - very fiddly



Thomas 'PointedEars' Lahn wrote:
<snip>

Yes, it would. Prototype.js uses a lot of closures which create circular
references, many of them unnecessary, which are known to leak memory in IE
if host objects (here: DOM objects) are involved (because its GC can't
handle that), and it does not clean up after itself. Adding the `href'
attribute to the `a' element makes it a link in the first place, so that its
corresponding object shows up in the document.links NodeList, for example.

Read the FAQ Notes. <http://jibbering.com/faq/faq_notes/closures.html#clMem>

This sounds promising... however, it seems to work backwards from my understanding. I thought that the memory leak happens when a DOM node has a circular reference to a JavaScript object. You seem to be saying that when a link is created, it's added to document.links... wouldn't that then mean that the link would have *more* references than non-links and hence be *more* likely to leak, rather than stop leaking? Or is there something I'm not understanding properly?
Thanks for your help.
.



Relevant Pages

  • Re: IE6 memory leak - very fiddly
    ... You should not simply snip what is being referred to in the quoted text, ... references, many of them unnecessary, which are known to leak memory in IE ...
    (comp.lang.javascript)
  • Re: IE6 memory leak - very fiddly
    ... references, many of them unnecessary, which are known to leak memory in IE ... DOM objects) are involved (because its GC can't ... I thought that the memory leak happens when a DOM node has a circular reference to a JavaScript object. ...
    (comp.lang.javascript)
  • Re: menus in JS or CSS - pros? cons?
    ... So in theory, attaching event handlers to ... The theory that says 'all circular references including DOM nodes causes ... but it does not identify all leak scenarios. ...
    (comp.lang.javascript)
  • Re: Memory leak in aspnet_wp.exe
    ... http://www.red-gate.com/code_profiling.htm (14 day free trial ought to be ... First you need to figure out if this is a managed or unmanaged leak. ... references to the same object all over the place (utility classes can often ... It did not send any responses for pending requests in ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Strange report from leaks
    ... Then later it reported a leak again. ...  I attached gdb and attaching gdb make the ... Since the tool detected no references, ... what happens when the address is read from disk -- ...
    (comp.unix.programmer)