diff options
Diffstat (limited to 'src/debug/di/rspriv.h')
-rw-r--r-- | src/debug/di/rspriv.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/debug/di/rspriv.h b/src/debug/di/rspriv.h index a89b17d49b..7238ffd787 100644 --- a/src/debug/di/rspriv.h +++ b/src/debug/di/rspriv.h @@ -1266,14 +1266,14 @@ public: LOG((LF_CORDB, LL_EVERYTHING, "Memory: CordbBase object deleted: this=%p, id=%p, Refcount=0x%x\n", this, m_id, m_RefCount)); #ifdef _DEBUG - InterlockedDecrement(&s_TotalObjectCount); - _ASSERTE(s_TotalObjectCount >= 0); + LONG newTotalObjectsCount = InterlockedDecrement(&s_TotalObjectCount); + _ASSERTE(newTotalObjectsCount >= 0); #endif // Don't shutdown logic until everybody is done with it. // If we leak objects, this may mean that we never shutdown logging at all! #if defined(_DEBUG) && defined(LOGGING) - if (s_TotalObjectCount == 0) + if (newTotalObjectsCount == 0) { ShutdownLogging(); } |