Fix memory leak

This commit is contained in:
Benau 2021-09-14 13:01:33 +08:00
parent 216ac8b988
commit c4fdf9c8ac
2 changed files with 8 additions and 0 deletions

View File

@ -511,3 +511,10 @@ void GPInfoScreen::updateHighscores()
m_highscore_list->addItem(StringUtils::toString(i),row);
}
} // updateHighscores
// -----------------------------------------------------------------------
void GPInfoScreen::unloaded()
{
delete m_icon_bank;
m_icon_bank = NULL;
} // unloaded

View File

@ -108,6 +108,7 @@ public:
virtual void onUpdate(float dt) OVERRIDE;
void setGP(const std::string &gp_ident);
virtual void unloaded() OVERRIDE;
}; // GPInfoScreen
#endif