[webkit-help] Possible memory leak or cache problem

john.kjellberg at power.alstom.com john.kjellberg at power.alstom.com
Mon Oct 5 08:15:09 PDT 2009


webkit-help-bounces at lists.webkit.org wrote on 2009-10-05 15:06:42:

> 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);

Thanks for trying this. I tested it and it didn't help at all on my 
computer. Also, it would have been strange since I'm actually using the 
same XMLHttpRequest() for each call. Not sure how JS handle it though, 
since the script still works after doing "delete.".

I also tried to create a new XMLHttpRequest() and deleting it for each 
request. That didn't change anything.

/ John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20091005/d98bafb2/attachment.html>


More information about the webkit-help mailing list