Skip to content

Commit

Permalink
Null debounced callback to set for GC.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaste committed Feb 25, 2016
1 parent 809352d commit f366c1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/debounce.html
Expand Up @@ -43,12 +43,14 @@
if (this.finish) {
this.finish();
this.finish = null;
this.callback = null;
}
},
complete: function() {
if (this.finish) {
var callback = this.callback;
this.stop();
this.callback.call(this.context);
callback.call(this.context);
}
}
};
Expand Down

0 comments on commit f366c1c

Please sign in to comment.