Skip to content

Commit

Permalink
Clean up references on both listener and listened objects
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell authored and akre54 committed Nov 3, 2014
1 parent b3ab611 commit e7126ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@
onces[name] = callback;
}
for (var event in onces) {
obj.once(event, _.bind(this.stopListening, this, obj, event, onces[event]));
callback = _.partial(this.stopListening, obj, event, onces[event]);
callback._callback = onces[event];
this.listenTo(obj, event, callback);
}
return this;
};
Expand Down

0 comments on commit e7126ec

Please sign in to comment.