From 3df3b181939bc1bbe7be6c9f01d2169b198358eb Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 23 Mar 2016 23:43:27 +0100 Subject: [PATCH] fixed memory leak when loading a new session (old cached tabs not purged, not garbage collected) --- browser/js/app/parser.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/browser/js/app/parser.js b/browser/js/app/parser.js index c5dfb124..8a7ac3a3 100644 --- a/browser/js/app/parser.js +++ b/browser/js/app/parser.js @@ -21,6 +21,12 @@ module.exports.tabs = function(data,parent,main,parentLabel){ WIDGETS_LINKED = {} WIDGETS_BY_PATH = {} SESSION = data + for (i in TABS) { + if (i!='#container') { + TABS[i].parent.remove() + TABS[i].tab.remove() + } + } TABS['#container'] = { tab:$('#container') }