DragonNest/Common/Utility/ObjectPool.cpp
2024-12-20 16:56:44 +08:00

29 lines
No EOL
814 B
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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 );
}