diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-10-24 11:55:35 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-10-24 11:55:35 +0300 |
commit | 37e4f69e3b2a1b1a58edb5930b53fe4dd0ef8df1 (patch) | |
tree | 490764ed2a00bf595884868eacd22e4f657fa409 /src/slic3r | |
parent | 894020986595ff74617300eabcde6404a747f2f0 (diff) |
Fixed memory leak in GLToolbar
Diffstat (limited to 'src/slic3r')
-rw-r--r-- | src/slic3r/GUI/GLToolbar.cpp | 8 | ||||
-rw-r--r-- | src/slic3r/GUI/GLToolbar.hpp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/slic3r/GUI/GLToolbar.cpp b/src/slic3r/GUI/GLToolbar.cpp index ec203541e..e094e1105 100644 --- a/src/slic3r/GUI/GLToolbar.cpp +++ b/src/slic3r/GUI/GLToolbar.cpp @@ -149,6 +149,14 @@ GLToolbar::GLToolbar(GLCanvas3D& parent) { } +GLToolbar::~GLToolbar() +{ + for (GLToolbarItem* item : m_items) + { + delete item; + } +} + bool GLToolbar::init(const std::string& icons_texture_filename, unsigned int items_icon_size, unsigned int items_icon_border_size, unsigned int items_icon_gap_size) { std::string path = resources_dir() + "/icons/"; diff --git a/src/slic3r/GUI/GLToolbar.hpp b/src/slic3r/GUI/GLToolbar.hpp index 7c0f5bf84..216171753 100644 --- a/src/slic3r/GUI/GLToolbar.hpp +++ b/src/slic3r/GUI/GLToolbar.hpp @@ -141,6 +141,7 @@ private: public: explicit GLToolbar(GLCanvas3D& parent); + ~GLToolbar(); bool init(const std::string& icons_texture_filename, unsigned int items_icon_size, unsigned int items_icon_border_size, unsigned int items_icon_gap_size); |