From 631d076a44fad1f430a162da0f6c080519d109df Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Sat, 18 Oct 2014 15:36:05 -0400 Subject: [PATCH] Release func in _.before and _.once --- underscore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index a25344613..6371899b4 100644 --- a/underscore.js +++ b/underscore.js @@ -836,7 +836,8 @@ return function() { if (--times > 0) { memo = func.apply(this, arguments); - } else { + } + if (times <= 1) { func = null; } return memo;