* 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:
parent
c56a21ed62
commit
a1f34e7e89
12
src/system/kernel/cache/block_cache.cpp
vendored
12
src/system/kernel/cache/block_cache.cpp
vendored
@ -803,13 +803,15 @@ block_cache::~block_cache()
|
||||
{
|
||||
deleting = true;
|
||||
|
||||
mutex_lock(&sCachesLock);
|
||||
sCaches.Remove(this);
|
||||
mutex_unlock(&sCachesLock);
|
||||
if (InitCheck() == B_OK) {
|
||||
mutex_lock(&sCachesLock);
|
||||
sCaches.Remove(this);
|
||||
mutex_unlock(&sCachesLock);
|
||||
|
||||
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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user