On Aug 27, 11:31 am, "John Resig" <[EMAIL PROTECTED]> wrote:
>
> YUI, Dojo, and jQuery all use this technique to avoid these leaks.
> It's unavoidable otherwise.
>

John,

I'm curious.  Been catching up of the technical issues and JS/DOM
framework, and it seems to me that a basic part of the issues is
related to closures and anonymous functions and how the JS user agents
deals with it.

I'm curious if you tried/explored initialize the  XHR.readystatechange
handler? How about XHR worker thread pools?  or not using a anonymous
function for the handler but a external function?

I tried all this for IE and FF and under Windows, I don't see any more
leaks.

I used this suggestion for initializing the hander:

http://www.volkanozcelik.com/cre8/blog/2006/04/another-way-to-prevent-memory-leak-in.html

var Constants = {
     NULL:function() {}
};

usage>  xml.onreadystatechange = Constants.NULL;

--
HLS

Reply via email to