aboutsummaryrefslogtreecommitdiff
path: root/src/cache.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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