From 1daab27ef618012529e39f9318cd9c847c766661 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 29 Sep 2022 13:51:50 +0200 Subject: [PATCH] Fixed a memory leak --- src/slic3r/GUI/BitmapCache.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp index 7fb0ce635e..4a90575149 100644 --- a/src/slic3r/GUI/BitmapCache.cpp +++ b/src/slic3r/GUI/BitmapCache.cpp @@ -34,8 +34,11 @@ void BitmapCache::clear() { for (std::pair &bitmap : m_map) delete bitmap.second; - m_map.clear(); + + for (std::pair &bitmap_bundle : m_bndl_map) + delete bitmap_bundle.second; + m_bndl_map.clear(); } static wxBitmap wxImage_to_wxBitmap_with_alpha(wxImage &&image, float scale = 1.0f)