From e58a03de9bb8a3a643ffcf7e2768dcde6b239a7c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 18 Feb 2017 14:18:27 +0100 Subject: [PATCH] - the savegame manager needs a destructor --- src/menu/loadsavemenu.cpp | 4 ++++ src/menu/menu.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/menu/loadsavemenu.cpp b/src/menu/loadsavemenu.cpp index 56cd60b39..b8989d2fa 100644 --- a/src/menu/loadsavemenu.cpp +++ b/src/menu/loadsavemenu.cpp @@ -66,6 +66,10 @@ void FSavegameManager::ClearSaveGames() SaveGames.Clear(); } +FSavegameManager::~FSavegameManager() +{ + ClearSaveGames(); +} //============================================================================= // // Save data maintenance diff --git a/src/menu/menu.h b/src/menu/menu.h index c73b8a7b6..2241513cb 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -80,7 +80,7 @@ private: public: int WindowSize = 0; FSaveGameNode *quickSaveSlot = nullptr; - + ~FSavegameManager(); private: int InsertSaveNode(FSaveGameNode *node);