[webkit-help] Possible memory leak or cache problem

Patrick Mueller pmuellr at muellerware.org
Mon Oct 5 06:06:42 PDT 2009


john.kjellberg at power.alstom.com wrote:
> Hi,
> 
> I wonder if some of you could  help me with this. The following request 
> increases memory usage on each request:
> 
> <html>
> <body>
> <script type="text/javascript">
> var xmlHttp=new XMLHttpRequest();
> 
> var i = 0;
> function test() {
>         xmlHttp.open("GET","mem_test.htm?" + (i++), false);
>         xmlHttp.send(null);
>     setTimeout(test,10);
> }
> 
> test();
> </script>
> Test
> </body>
> </html>
> ...

(posting again, first response didn't seem to go through)

I was able to reproduce this, I think, on Mac.  I was able to defeat the 
memory growth by adding a

     delete xmlHttp;

after the xmlHttp.send(null);

-- 
Patrick Mueller - http://muellerware.org



More information about the webkit-help mailing list