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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -