diff --git a/src/renderer_d3d11.h b/src/renderer_d3d11.h index 3b196040..ac068c01 100644 --- a/src/renderer_d3d11.h +++ b/src/renderer_d3d11.h @@ -52,16 +52,10 @@ namespace bgfx { for (HashMap::iterator it = m_hashMap.begin(), itEnd = m_hashMap.end(); it != itEnd; ++it) { + DX_CHECK_REFCOUNT(it->second, 1); it->second->Release(); } -#if BGFX_CONFIG_DEBUG - for (HashMap::iterator it = m_hashMap.begin(), itEnd = m_hashMap.end(); it != itEnd; ++it) - { - DX_CHECK_REFCOUNT(it->second, 0); - } -#endif // BGFX_CONFIG_DEBUG - m_hashMap.clear(); }