mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Major fix to memory leaks. Hurray this is 99% of all leaks.
This commit is contained in:
parent
7a3dce136f
commit
560acc75b5
2 changed files with 10 additions and 0 deletions
|
@ -62,6 +62,10 @@ NEWSBLUR.Views.FeedTitleView = Backbone.View.extend({
|
|||
},
|
||||
|
||||
remove: function() {
|
||||
if (this.counts_view) {
|
||||
this.counts_view.destroy();
|
||||
}
|
||||
|
||||
this.stopListening(this.model);
|
||||
Backbone.View.prototype.remove.call(this);
|
||||
},
|
||||
|
|
|
@ -49,6 +49,12 @@ NEWSBLUR.Views.Folder = Backbone.View.extend({
|
|||
},
|
||||
|
||||
destroy: function() {
|
||||
if (this.folder_count) {
|
||||
this.folder_count.destroy();
|
||||
}
|
||||
if (this.search_view) {
|
||||
this.search_view.remove();
|
||||
}
|
||||
if (this.model) {
|
||||
this.model.unbind(null, null, this);
|
||||
if (!this.options.feedbar) {
|
||||
|
|
Loading…
Add table
Reference in a new issue