diff options
author | Mike Buland <eichlan@xagasoft.com> | 2013-03-25 23:31:03 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2013-03-25 23:31:03 +0000 |
commit | cc81b205410c2cf8e20a53eea745d9d8aee57f6c (patch) | |
tree | c5f158fc5ce573a8e3ddb2f845dc2514a091a9f7 | |
parent | ea768b490a1881dfa443f16ade34300088bbdf94 (diff) | |
download | libbu++-cc81b205410c2cf8e20a53eea745d9d8aee57f6c.tar.gz libbu++-cc81b205410c2cf8e20a53eea745d9d8aee57f6c.tar.bz2 libbu++-cc81b205410c2cf8e20a53eea745d9d8aee57f6c.tar.xz libbu++-cc81b205410c2cf8e20a53eea745d9d8aee57f6c.zip |
Corrected a pure virtual call issue while destroying caches.
-rw-r--r-- | src/unstable/cachebase.h | 4 | ||||
-rw-r--r-- | src/unstable/cacheobject.h | 5 | ||||
-rw-r--r-- | src/unstable/myriadcache.h | 2 |
3 files changed, 8 insertions, 3 deletions
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 @@ | |||
15 | #include "bu/mutexlocker.h" | 15 | #include "bu/mutexlocker.h" |
16 | #include "bu/cacheobject.h" | 16 | #include "bu/cacheobject.h" |
17 | 17 | ||
18 | #include "bu/sio.h" | ||
19 | |||
18 | namespace Bu | 20 | namespace Bu |
19 | { | 21 | { |
20 | template<typename keytype, typename obtype> class CacheBase; | 22 | template<typename keytype, typename obtype> class CacheBase; |
@@ -320,8 +322,6 @@ namespace Bu | |||
320 | 322 | ||
321 | virtual ~CacheBase() | 323 | virtual ~CacheBase() |
322 | { | 324 | { |
323 | Bu::ReadWriteMutex::WriteLocker wl( mCacheEntry ); | ||
324 | syncChanges(); | ||
325 | } | 325 | } |
326 | 326 | ||
327 | typedef CacheEntry<keytype, obtype> Entry; | 327 | typedef CacheEntry<keytype, obtype> 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 | |||
66 | this->bChanged = bChanged; | 66 | this->bChanged = bChanged; |
67 | } | 67 | } |
68 | 68 | ||
69 | CacheType *getCache() | ||
70 | { | ||
71 | return pCache; | ||
72 | } | ||
73 | |||
69 | private: | 74 | private: |
70 | typedef CacheEntry<keytype, obtype> Entry; | 75 | typedef CacheEntry<keytype, obtype> Entry; |
71 | void setCache( CacheType *pCache, Entry *pEntry ) | 76 | 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 | |||
50 | 50 | ||
51 | virtual ~MyriadCache() | 51 | virtual ~MyriadCache() |
52 | { | 52 | { |
53 | _sync(); | 53 | Bu::CacheBase<keytype,obtype>::sync(); |
54 | } | 54 | } |
55 | 55 | ||
56 | using typename Bu::CacheBase<keytype,obtype>::KeyList; | 56 | using typename Bu::CacheBase<keytype,obtype>::KeyList; |