Erik Arvidsson wrote:
ok, How can I decide to kick in the memory? Is there any Component to access it?The memory will only be freed once the garbage collector kicks in.erik "jose antonio" 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. >
I think it could be interesting. I need to free the memory after each request.
In addition, my function have the request object like a local var. When the function has finished the memory might be freed.
