Fixes ISSUE-45089: Remove leak by destroying previous loading pane always
A smartclient memory leak was happening when opening the same tab 2 or more times without closing it. To fix this, the old pane should be destroyed when the window is opened and replacing the old tab.
To achieve this, pane.isLoadingTab is used to check if the pane we are switching to, is also loading and destroy the previous pane in this case.
Testing
-
Try: https://builds.openbravo.com/view/try/job/try-init/324/ ✔ (A false positive on one of oracle jobs) -
Try-retail: https://builds.openbravo.com/job/try-ret-init/1363/artifact/retail.html ✔ (A few oracle only false-positives present)
Edited by Cristian Berner