初步修复
This commit is contained in:
parent
8fc4357cc6
commit
e4714f3f0e
46705 changed files with 12004901 additions and 0 deletions
29
Common/Utility/ObjectPool.cpp
Normal file
29
Common/Utility/ObjectPool.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include "stdafx.h"
|
||||
#include "ObjectPool.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new new(_NORMAL_BLOCK,__FILE__,__LINE__)
|
||||
#endif
|
||||
|
||||
|
||||
SyncObject::SyncObject()
|
||||
{
|
||||
::InitializeCriticalSection( &m_cs );
|
||||
}
|
||||
|
||||
SyncObject::~SyncObject()
|
||||
{
|
||||
::DeleteCriticalSection( &m_cs );
|
||||
}
|
||||
|
||||
void
|
||||
SyncObject::Lock()
|
||||
{
|
||||
::EnterCriticalSection( &m_cs );
|
||||
}
|
||||
|
||||
void
|
||||
SyncObject::Unlock()
|
||||
{
|
||||
::LeaveCriticalSection( &m_cs );
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue