From 6bba2e435b8fc387fc2dfd696d55b2b73e6efaae Mon Sep 17 00:00:00 2001 From: Valentina Zhuravska Date: Wed, 16 Sep 2015 19:37:33 +0300 Subject: [PATCH] Fixed memory leaks --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 8ae19a4b5..c81bcd3ac 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -1184,6 +1184,22 @@ void MainWindow::SyncMeasurements() void MainWindow::ToolBarOption() { ui->toolBarOption->clear(); + if (mouseCoordinate != nullptr) + { + delete mouseCoordinate; + mouseCoordinate = nullptr; + } + if (gradationHeights != nullptr) + { + delete gradationHeights; + gradationHeights = nullptr; + } + if (gradationSizes != nullptr) + { + delete gradationSizes; + gradationSizes = nullptr; + } + if (qApp->patternType() == MeasurementsType::Standard) { const QStringList listHeights = VMeasurement::ListHeights(doc->GetGradationHeights(), qApp->patternUnit());