From 25837426a9a77f679afd55974af62bd048b751a9 Mon Sep 17 00:00:00 2001 From: chelovechishko Date: Tue, 12 Apr 2022 16:28:58 +0900 Subject: [PATCH] gui: statistics: set attribute Qt::WA_DeleteOnClose for the window to free memory on close. before opening->clicked through all tabs->after closing without WA_DeleteOnClose: 180->225->225 ; ->225->225... with WA_DeleteOnClose: 180->226->187 ; ->224->189... There is a mud with spaceotabulation, so don't poke me for doing automatic things for indentation, instead of understanding what should be there for new code. 'tis no more saves last opened statistics' tab, but hopefully nobody needs such a thing. --- retroshare-gui/src/gui/statistics/StatisticsWindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp b/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp index 48b1462cc..c392aec05 100644 --- a/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp +++ b/retroshare-gui/src/gui/statistics/StatisticsWindow.cpp @@ -97,6 +97,7 @@ StatisticsWindow::StatisticsWindow(QWidget *parent) : ui(new Ui::StatisticsWindow) { ui->setupUi(this); + setAttribute(Qt::WA_DeleteOnClose, true); Settings->loadWidgetInformation(this);