diff --git a/cockatrice/src/client/settings/cache_settings.cpp b/cockatrice/src/client/settings/cache_settings.cpp index 08eccf1e4..fb66a6ebb 100644 --- a/cockatrice/src/client/settings/cache_settings.cpp +++ b/cockatrice/src/client/settings/cache_settings.cpp @@ -50,6 +50,13 @@ SettingsCache &SettingsCache::instance() return *settingsCache; // returns a QT managed singleton reference } +SettingsCache::~SettingsCache() +{ + for (ReleaseChannel *releaseChannel : releaseChannels) { + delete releaseChannel; + } +} + QString SettingsCache::getDataPath() { if (isPortableBuild) { diff --git a/cockatrice/src/client/settings/cache_settings.h b/cockatrice/src/client/settings/cache_settings.h index 5f699247d..472aac44f 100644 --- a/cockatrice/src/client/settings/cache_settings.h +++ b/cockatrice/src/client/settings/cache_settings.h @@ -99,6 +99,7 @@ private: public: SettingsCache(); + ~SettingsCache() override; QString getDataPath(); QString getSettingsPath(); [[nodiscard]] QString getCachePath() const;