Clear message collections when the window is closed
We don't need to keep them in memory if we're done viewing them, plus it avoids having to re-render a large collection when we re-open a conversation. Now that we only load a sensible number of messages at a time, caching them between usages is less valuable. Removing them from the collection should free them for garbage collection. // FREEBIE
This commit is contained in:
parent
2fc78ddd7d
commit
765668b3d3
1 changed files with 1 additions and 0 deletions
|
@ -62,6 +62,7 @@
|
|||
this.appWindow.contentWindow.removeEventListener('focus', onFocus);
|
||||
window.autosize.destroy(this.$messageField);
|
||||
this.remove();
|
||||
this.model.messageCollection.reset([]);
|
||||
}.bind(this));
|
||||
|
||||
this.fetchMessages();
|
||||
|
|
Loading…
Reference in a new issue