From 7343fe4cc6e364dd3be8f2af4efd9f3a2d748c58 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 29 Sep 2019 13:21:12 +0200 Subject: Cleanup: Implicitly free QApplication Instead of deleting the Application explicitly in exit_ui(), use a unique_ptr to have the instance automatically freed. This is the pattern given in the Qt-docs: https://doc.qt.io/qt-5/qapplication.html Signed-off-by: Berthold Stoeger --- subsurface-helper.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'subsurface-helper.cpp') diff --git a/subsurface-helper.cpp b/subsurface-helper.cpp index c389e2099..9ce1a615a 100644 --- a/subsurface-helper.cpp +++ b/subsurface-helper.cpp @@ -56,7 +56,6 @@ void exit_ui() #ifndef SUBSURFACE_MOBILE delete MainWindow::instance(); #endif // SUBSURFACE_MOBILE - delete qApp; free((void *)existing_filename); } -- cgit v1.2.3-70-g09d2