From 441e8980b81186e00fe4c79109f616343deb7eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 10 Aug 2019 19:58:58 +0200 Subject: [PATCH] NOISSUE fix small memory leaks --- application/pages/global/MultiMCPage.cpp | 1 + application/pages/instance/ServersPage.cpp | 1 + application/widgets/CustomCommands.cpp | 1 + application/widgets/CustomCommands.h | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/application/pages/global/MultiMCPage.cpp b/application/pages/global/MultiMCPage.cpp index 541af2876..3a8c46e8f 100644 --- a/application/pages/global/MultiMCPage.cpp +++ b/application/pages/global/MultiMCPage.cpp @@ -83,6 +83,7 @@ MultiMCPage::MultiMCPage(QWidget *parent) : QWidget(parent), ui(new Ui::MultiMCP MultiMCPage::~MultiMCPage() { delete ui; + delete defaultFormat; } bool MultiMCPage::apply() diff --git a/application/pages/instance/ServersPage.cpp b/application/pages/instance/ServersPage.cpp index c33eef1f2..8b0c655c2 100644 --- a/application/pages/instance/ServersPage.cpp +++ b/application/pages/instance/ServersPage.cpp @@ -597,6 +597,7 @@ ServersPage::ServersPage(MinecraftInstance * inst, QWidget* parent) ServersPage::~ServersPage() { m_model->saveNow(); + delete ui; } void ServersPage::ShowContextMenu(const QPoint& pos) diff --git a/application/widgets/CustomCommands.cpp b/application/widgets/CustomCommands.cpp index 9e7673fd4..24bdc07da 100644 --- a/application/widgets/CustomCommands.cpp +++ b/application/widgets/CustomCommands.cpp @@ -3,6 +3,7 @@ CustomCommands::~CustomCommands() { + delete ui; } CustomCommands::CustomCommands(QWidget* parent): diff --git a/application/widgets/CustomCommands.h b/application/widgets/CustomCommands.h index 451b2cc05..4d447f7b4 100644 --- a/application/widgets/CustomCommands.h +++ b/application/widgets/CustomCommands.h @@ -28,7 +28,7 @@ class CustomCommands : public QWidget public: explicit CustomCommands(QWidget *parent = 0); - ~CustomCommands(); + virtual ~CustomCommands(); void initialize(bool checkable, bool checked, const QString & prelaunch, const QString & wrapper, const QString & postexit); bool checked() const;