Fixed a lot of memory leaks caused by static globals never getting

deleted and some other objects not getting deleted properly due to missing
destructors.
This commit is contained in:
Shenjoku
2013-04-18 21:17:57 -07:00
parent 5f7001ef0a
commit 01456ed0b9
29 changed files with 239 additions and 171 deletions
+2 -2
View File
@@ -138,8 +138,8 @@ struct ThreadSlot *g_pUnknownThreadSlot = NULL;
* so possibly racing over them is harmless (simply using a stale thread ID, etc). */
static RageMutex &GetThreadSlotsLock()
{
static RageMutex *pLock = smnew RageMutex( "ThreadSlots" );
return *pLock;
static RageMutex lock( "ThreadSlots" );
return lock;
}
static int FindEmptyThreadSlot()