jquery - Will setTimeOut function in recursive function cause stack overflow? -
jquery - Will setTimeOut function in recursive function cause stack overflow? -
does next function cause stack overthrow eventually?
var isfinish= false; function foo(){ // ajax phone call //in ajax success success: function(response){ settimeout(function(){ if (!isfinish) { foo(); } },1000); } }
it shouldn't. settimeout asynchronous (presumably ajax request), foo able exit immediately.
if jquery has memory leaks in $.ajax, that's issue.
jquery
Comments
Post a Comment