Memory Leak with an XMLHttpRequest and setInterval

前端 未结 3 717
迷失自我
迷失自我 2021-01-21 02:57

Here\'s some code that I run on Google Chrome 19.0.1061.1 (Official Build 125213) dev:


Memory Leak


        
3条回答
  •  天涯浪人
    2021-01-21 03:28

    How long does this http call take? if this takes longer then 50ms (which is a very shot amount of time) then the first case will be creating more and more pending requests while then second case you are reusing the same XMLHttpRequest which may have the effect of canceling the previous call.

提交回复
热议问题