MCPcopy Create free account
hub / github.com/defold/defold / FreeTimer

Function FreeTimer

engine/script/src/script_timer.cpp:147–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 static void FreeTimer(HTimerWorld timer_world, Timer* timer)
148 {
149 assert(timer_world != 0x0);
150 assert(timer->m_IsAlive == 0);
151
152 LuaCallbackInfo* callback = (LuaCallbackInfo*) timer->m_UserData;
153 timer->m_UserData = 0;
154 if (IsCallbackValid(callback))
155 {
156 DestroyCallback(callback);
157 }
158
159 uint16_t index = GetIndexFromHandle(timer->m_Handle);
160 DeallocateTimer(timer_world, index);
161 }
162
163 HTimerWorld NewTimerWorld()
164 {

Callers 3

UpdateTimersFunction · 0.85
CancelTimerFunction · 0.85
KillTimersFunction · 0.85

Calls 5

IsCallbackValidFunction · 0.85
DestroyCallbackFunction · 0.85
GetIndexFromHandleFunction · 0.85
DeallocateTimerFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected