mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
1da7f651ea
* Implement/match `CScriptTimers::FreeMem(...)`
37 lines
779 B
C++
37 lines
779 B
C++
|
|
#include "main.h"
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
CScriptTimers::CScriptTimers()
|
|
{
|
|
m_dwTimerCount = 0;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
CScriptTimers::~CScriptTimers()
|
|
{
|
|
DwordTimerMap::iterator itor;
|
|
for (itor = m_Timers.begin(); itor != m_Timers.end(); itor++)
|
|
{
|
|
FreeMem(itor->second);
|
|
SAFE_DELETE(itor->second);
|
|
}
|
|
m_Timers.clear();
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|
|
void CScriptTimers::FreeMem(ScriptTimer_s* Timer)
|
|
{
|
|
if (Timer->cellParams != NULL)
|
|
{
|
|
free(Timer->cellParams);
|
|
Timer->cellParams = NULL;
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------------------------------------
|
|
|