locked
Recursive promises - a problem for the garbage collector?

    Question

  • Given this function:

    syncUpAsync = function() { data.history.getNextUnsyncedEventAsync().then(function(event)) { if event { processHistoryEventAsync(event).then(syncUpAsync);
    }
    });
    }

    Will this lead to excessive memory usage because of the captures "event" object?

    The call stack seems normal, there seem to be no recursion involved.

    Should I use a WinJS.Promise.timeout here instead of .then(syncUpAsync) ?

    Thursday, November 22, 2012 9:34 AM