diff --git a/underscore.js b/underscore.js index b86ec8c49..63c111e1a 100644 --- a/underscore.js +++ b/underscore.js @@ -710,14 +710,21 @@ timeout = setTimeout(later, wait - last); } else { timeout = null; - if (!immediate) result = func.apply(context, args); + if (!immediate) { + result = func.apply(context, args); + context = args = null; + } } }; var callNow = immediate && !timeout; if (!timeout) { timeout = setTimeout(later, wait); } - if (callNow) result = func.apply(context, args); + if (callNow) { + result = func.apply(context, args); + context = args = null; + } + return result; }; };