From cacea26e3fa51df3552f910ae0e7cf0c196a7d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Fri, 22 Apr 2022 13:04:36 +0200 Subject: [PATCH] Fix cleanup when deleting mode --- Software/PC_Application/mode.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Software/PC_Application/mode.cpp b/Software/PC_Application/mode.cpp index 3f311c7..b8f6d7d 100644 --- a/Software/PC_Application/mode.cpp +++ b/Software/PC_Application/mode.cpp @@ -110,6 +110,13 @@ Mode::~Mode() modes[tabbar->currentIndex()]->activate(); } window->getCentral()->removeWidget(central); + delete central; + for(auto d : docks) { + delete d; + } + for(auto t : toolbars) { + delete t; + } } void Mode::activate()