The memory will only be freed once the garbage collector kicks in. erik
"jose antonio" <[EMAIL PROTECTED]> wrote in message news:ap94u2$g1a1@;ripley.netscape.com... > Hello, > I am trying to get remote XML with XMLHttpRequest. my source code is: > > function load() { > var req = new XMLHttpRequest(); > req.open("GET","http://www.foo.com/anxml.xml",false); > req.setRequestHeader('content-type','text/xml'); > req.onload = function() { > alert("received"); > } > req.send(null); > > } > > it works, but When I execute the function load more than once, the > memory used by mozilla grows exactly the size of the document I am > requesting. For example: > > first time: 22.4 mb; > second time: 23.4 mb; > third time: 24.4 mb; > > when the file size is 1mb; > > But, if I initialize the req object like a global variable, the memory > is always the same. > > I don't understand why the memory is being increased. The object would > be destroyed every time the function load finishes. Or it would not? > > Is it a bug? Is it correct? > > Thanks. >
