Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Dataview needs to unbind events before removing its $el

  • Loading branch information...
commit ea60efc6dd91b9a8e86e93c7b7ea318068e43dbe 1 parent b7703e3
@robrobbins robrobbins authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  extras/dataview/dataview.js
View
2  extras/dataview/dataview.js
@@ -56,6 +56,8 @@ sudo.DataView.prototype.build = function build() {
// `returns` {Object} `this`
sudo.DataView.prototype.removeFromParent = function removeFromParent() {
this.parent.removeChild(this);
+ // all events need to be unbound to avoid memory leaks
+ this.unbindEvents();
this.$el.remove();
return this;
};
Please sign in to comment.
Something went wrong with that request. Please try again.