-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
When using the ImageView.doOnLoad, the closure is leaked due to Callback not clearing the closures on it's "to run when fired list" after being fired.
diff --git a/packages/lib/Callback.js b/packages/lib/Callback.js
index 7a610c9..b476f20 100644
--- a/packages/lib/Callback.js
+++ b/packages/lib/Callback.js
@@ -67,6 +67,8 @@ exports = Class(function() {
for(var i = 0, len = cbs.length; i < len; ++i) {
if (cbs[i]) { cbs[i].apply(this, arguments); }
}
+ // Clear listeners to prevent leakage:
+ cbs.length = 0;
};
this.chain = function(id) {Metadata
Metadata
Assignees
Labels
No labels