Fixed usage of D3D12MA_DEBUG_GLOBAL_MUTEX_LOCK

Closes #29
This commit is contained in:
Adam Sawicki 2021-12-08 10:23:25 +01:00
parent dd4f5e81ac
commit 1d8ba60f3e

View File

@ -4667,8 +4667,6 @@ void Pool::ReleaseThis()
return;
}
D3D12MA_DEBUG_GLOBAL_MUTEX_LOCK
D3D12MA_DELETE(m_Pimpl->GetAllocator()->GetAllocs(), this);
}
@ -6119,8 +6117,6 @@ void Allocation::ReleaseThis()
return;
}
D3D12MA_DEBUG_GLOBAL_MUTEX_LOCK
SAFE_RELEASE(m_Resource);
switch(m_PackedData.GetType())
@ -6279,8 +6275,6 @@ Allocator::~Allocator()
void Allocator::ReleaseThis()
{
D3D12MA_DEBUG_GLOBAL_MUTEX_LOCK
// Copy is needed because otherwise we would call destructor and invalidate the structure with callbacks before using it to free memory.
const ALLOCATION_CALLBACKS allocationCallbacksCopy = m_Pimpl->GetAllocs();
D3D12MA_DELETE(allocationCallbacksCopy, this);
@ -6534,8 +6528,6 @@ VirtualBlock::~VirtualBlock()
void VirtualBlock::ReleaseThis()
{
D3D12MA_DEBUG_GLOBAL_MUTEX_LOCK
// Copy is needed because otherwise we would call destructor and invalidate the structure with callbacks before using it to free memory.
const ALLOCATION_CALLBACKS allocationCallbacksCopy = m_Pimpl->m_AllocationCallbacks;
D3D12MA_DELETE(allocationCallbacksCopy, this);