From cc81b205410c2cf8e20a53eea745d9d8aee57f6c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 25 Mar 2013 23:31:03 +0000 Subject: Corrected a pure virtual call issue while destroying caches. --- src/unstable/cachebase.h | 4 ++-- src/unstable/cacheobject.h | 5 +++++ src/unstable/myriadcache.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/unstable') diff --git a/src/unstable/cachebase.h b/src/unstable/cachebase.h index 026e69b..270c2df 100644 --- a/src/unstable/cachebase.h +++ b/src/unstable/cachebase.h @@ -15,6 +15,8 @@ #include "bu/mutexlocker.h" #include "bu/cacheobject.h" +#include "bu/sio.h" + namespace Bu { template class CacheBase; @@ -320,8 +322,6 @@ namespace Bu virtual ~CacheBase() { - Bu::ReadWriteMutex::WriteLocker wl( mCacheEntry ); - syncChanges(); } typedef CacheEntry Entry; diff --git a/src/unstable/cacheobject.h b/src/unstable/cacheobject.h index d8ed431..114a76f 100644 --- a/src/unstable/cacheobject.h +++ b/src/unstable/cacheobject.h @@ -66,6 +66,11 @@ namespace Bu this->bChanged = bChanged; } + CacheType *getCache() + { + return pCache; + } + private: typedef CacheEntry Entry; void setCache( CacheType *pCache, Entry *pEntry ) diff --git a/src/unstable/myriadcache.h b/src/unstable/myriadcache.h index ce0f2fa..9bc926f 100644 --- a/src/unstable/myriadcache.h +++ b/src/unstable/myriadcache.h @@ -50,7 +50,7 @@ namespace Bu virtual ~MyriadCache() { - _sync(); + Bu::CacheBase::sync(); } using typename Bu::CacheBase::KeyList; -- cgit v1.2.3