Fixed a memory leak

This commit is contained in:
Lukas Matena 2022-09-29 13:51:50 +02:00
parent 524e55edd9
commit 1daab27ef6

View file

@ -34,8 +34,11 @@ void BitmapCache::clear()
{
for (std::pair<const std::string, wxBitmap*> &bitmap : m_map)
delete bitmap.second;
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)