ThreadSlot::Release

This commit is contained in:
Glenn Maynard
2005-12-19 02:18:09 +00:00
parent 17a5f66438
commit f3c49dd4bc
+8 -6
View File
@@ -76,6 +76,12 @@ struct ThreadSlot
used = false;
}
void Release()
{
SAFE_DELETE( pImpl );
Init();
}
const char *GetThreadName() const;
};
@@ -267,9 +273,7 @@ RageThreadRegister::~RageThreadRegister()
{
LockMut( g_ThreadSlotsLock );
delete m_pSlot->pImpl;
m_pSlot->pImpl = NULL;
m_pSlot->Init();
m_pSlot->Release();
m_pSlot = NULL;
}
@@ -311,9 +315,7 @@ int RageThread::Wait()
LockMut( g_ThreadSlotsLock );
delete m_pSlot->pImpl;
m_pSlot->pImpl = NULL;
m_pSlot->Init();
m_pSlot->Release();
m_pSlot = NULL;
return ret;