Clear the func variable in _.once so the function may be garbage collected.

Former-commit-id: 521a9d997cb206a5c468b30e5dfa8e096e1a13d5
This commit is contained in:
John-David Dalton
2012-08-09 00:16:35 -07:00
parent 32b302314e
commit 1ea19daad9

View File

@@ -3421,6 +3421,9 @@
}
ran = true;
result = func.apply(this, arguments);
// clear the `func` variable so the function may be garbage collected
func = null;
return result;
};
}