mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-22 13:28:22 -05:00
Fix #1339 - Add Backbone.View#destroy.
This commit is contained in:
@@ -1183,6 +1183,13 @@
|
||||
return this;
|
||||
},
|
||||
|
||||
// **destroy** should clean up any references created by this view,
|
||||
// preventing memory leaks. The convention is for **destroy** to always
|
||||
// return `this`.
|
||||
destroy: function() {
|
||||
return this;
|
||||
},
|
||||
|
||||
// Remove this view from the DOM. Note that the view isn't present in the
|
||||
// DOM by default, so calling this method may be a no-op.
|
||||
remove: function() {
|
||||
|
||||
Reference in New Issue
Block a user