mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 01:25:38 +00:00
Fixed a memory leak where some textures were not deleted during gamelist reloads.
This commit is contained in:
parent
c9a3dbc82e
commit
295bb0c4c4
|
@ -41,6 +41,15 @@ ISimpleGameListView::ISimpleGameListView(
|
||||||
addChild(&mBackground);
|
addChild(&mBackground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ISimpleGameListView::~ISimpleGameListView()
|
||||||
|
{
|
||||||
|
for (auto extra : mThemeExtras) {
|
||||||
|
removeChild(extra);
|
||||||
|
delete extra;
|
||||||
|
}
|
||||||
|
mThemeExtras.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void ISimpleGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
void ISimpleGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
|
||||||
{
|
{
|
||||||
using namespace ThemeFlags;
|
using namespace ThemeFlags;
|
||||||
|
|
|
@ -17,8 +17,7 @@ class ISimpleGameListView : public IGameListView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ISimpleGameListView(Window* window, FileData* root);
|
ISimpleGameListView(Window* window, FileData* root);
|
||||||
|
virtual ~ISimpleGameListView();
|
||||||
virtual ~ISimpleGameListView() {}
|
|
||||||
|
|
||||||
// Called when a new file is added, a file is removed, a file's metadata changes,
|
// Called when a new file is added, a file is removed, a file's metadata changes,
|
||||||
// or a file's children are sorted.
|
// or a file's children are sorted.
|
||||||
|
|
Loading…
Reference in a new issue