From bb6706e996cb97d6717725383b4009512df28245 Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 15 Aug 2020 18:54:00 +0200 Subject: [PATCH] added missing destructor in MsgMetaCache --- libretroshare/src/gxs/rsdataservice.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libretroshare/src/gxs/rsdataservice.h b/libretroshare/src/gxs/rsdataservice.h index 56dc8dea6..bf532afae 100644 --- a/libretroshare/src/gxs/rsdataservice.h +++ b/libretroshare/src/gxs/rsdataservice.h @@ -39,6 +39,14 @@ template class t_MetaDataCache { public: t_MetaDataCache() : mCache_ContainsAllMetas(false) {} + virtual ~t_MetaDataCache() + { + for(auto it: mMetas) + delete it.second; + + for(auto it: mOldCachedItems) + delete it.second; + } bool isCacheUpToDate() const { return mCache_ContainsAllMetas ; } void setCacheUpToDate(bool b) { mCache_ContainsAllMetas = b; }