mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user