mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed memory leak in GLToolbar
This commit is contained in:
parent
8940209865
commit
37e4f69e3b
2 changed files with 9 additions and 0 deletions
|
@ -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)
|
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/";
|
std::string path = resources_dir() + "/icons/";
|
||||||
|
|
|
@ -141,6 +141,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GLToolbar(GLCanvas3D& parent);
|
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);
|
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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue