mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 10:19:00 +08:00
Fixed a memory leak
This commit is contained in:
parent
524e55edd9
commit
1daab27ef6
@ -34,8 +34,11 @@ void BitmapCache::clear()
|
|||||||
{
|
{
|
||||||
for (std::pair<const std::string, wxBitmap*> &bitmap : m_map)
|
for (std::pair<const std::string, wxBitmap*> &bitmap : m_map)
|
||||||
delete bitmap.second;
|
delete bitmap.second;
|
||||||
|
|
||||||
m_map.clear();
|
m_map.clear();
|
||||||
|
|
||||||
|
for (std::pair<const std::string, wxBitmapBundle*> &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)
|
static wxBitmap wxImage_to_wxBitmap_with_alpha(wxImage &&image, float scale = 1.0f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user