aboutsummaryrefslogtreecommitdiff
path: root/src/cache.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-05-01 02:47:08 +0000
committerMike Buland <eichlan@xagasoft.com>2010-05-01 02:47:08 +0000
commitaeb8bee786a9495c78ed94e2a8485ed790714635 (patch)
tree8ffe8bb122daedabb92c18495d9cb95e601f71ea /src/cache.h
parentdaa25c26e99eb62a4ce499f8079b15734987ac0d (diff)
downloadlibbu++-aeb8bee786a9495c78ed94e2a8485ed790714635.tar.gz
libbu++-aeb8bee786a9495c78ed94e2a8485ed790714635.tar.bz2
libbu++-aeb8bee786a9495c78ed94e2a8485ed790714635.tar.xz
libbu++-aeb8bee786a9495c78ed94e2a8485ed790714635.zip
The cache...
Diffstat (limited to 'src/cache.h')
-rw-r--r--src/cache.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/cache.h b/src/cache.h
index 06b798c..1753407 100644
--- a/src/cache.h
+++ b/src/cache.h
@@ -317,20 +317,23 @@ namespace Bu
317 void erase( const keytype &cId ) 317 void erase( const keytype &cId )
318 { 318 {
319 TRACE( cId ); 319 TRACE( cId );
320 try { 320 if( hEnt.has( cId ) )
321 if( hEnt.get( cId ).iRefs > 0 ) 321 {
322 { 322 try {
323 printf("Shouldn't delete, references still exist!\n"); 323 if( hEnt.get( cId ).iRefs > 0 )
324 return; 324 {
325 printf("Shouldn't delete, references still exist!\n");
326 return;
327 }
325 } 328 }
329 catch( Bu::HashException &e ) {
330 get( cId );
331 }
332
333 pCalc->onUnload( hEnt.get( cId ).pData, cId );
334 pStore->destroy( hEnt.get( cId ).pData, cId );
326 } 335 }
327 catch( Bu::HashException &e ) { 336
328 get( cId );
329 }
330
331 pCalc->onUnload( hEnt.get( cId ).pData, cId );
332
333 pStore->destroy( hEnt.get( cId ).pData, cId );
334 hEnt.erase( cId ); 337 hEnt.erase( cId );
335 } 338 }
336 339