added virtual destuctor for menu things

This commit is contained in:
2022-10-03 17:02:34 +02:00
parent a1a976be57
commit ee5bc9129a
9 changed files with 46 additions and 58 deletions
+5
View File
@@ -14,6 +14,11 @@ Menu::Menu() {
this->selectedEntry = this->entrys.begin();
}
Menu::~Menu() {
for (std::list<MenuAction*>::iterator iter = this->entrys.begin(); iter != this->entrys.end(); iter++)
delete *iter;
}
void Menu::addEntry(MenuAction* entry) {
this->entrys.push_back(entry);