From 6cfb9bec363f6d485bcf8b5b73747df8c793e320 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Thu, 27 Jun 2019 15:23:03 +0200 Subject: [PATCH] Removed memory leaks due to Plater::priv::config not being deleted --- src/slic3r/GUI/Plater.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 65cf326df..a0deb52e3 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1526,6 +1526,7 @@ struct Plater::priv static const std::regex pattern_prusa; priv(Plater *q, MainFrame *main_frame); + ~priv(); void update(bool force_full_scene_refresh = false); void select_view(const std::string& direction); @@ -1795,6 +1796,12 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) camera.set_type(get_config("use_perspective_camera")); } +Plater::priv::~priv() +{ + if (config != nullptr) + delete config; +} + void Plater::priv::update(bool force_full_scene_refresh) { // the following line, when enabled, causes flickering on NVIDIA graphics cards