* Only remove the block cache from the list, and its low resource handler when

this is actually needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27060 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-08-19 11:30:14 +00:00
parent c56a21ed62
commit a1f34e7e89
+2
View File
@@ -803,6 +803,7 @@ block_cache::~block_cache()
{ {
deleting = true; deleting = true;
if (InitCheck() == B_OK) {
mutex_lock(&sCachesLock); mutex_lock(&sCachesLock);
sCaches.Remove(this); sCaches.Remove(this);
mutex_unlock(&sCachesLock); mutex_unlock(&sCachesLock);
@@ -810,6 +811,7 @@ block_cache::~block_cache()
unregister_low_resource_handler(&block_cache::LowMemoryHandler, this); unregister_low_resource_handler(&block_cache::LowMemoryHandler, this);
mutex_destroy(&lock); mutex_destroy(&lock);
}
condition_variable.Unpublish(); condition_variable.Unpublish();