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

Function TimerFinalizeScriptInstance

engine/script/src/script_timer.cpp:488–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486 }
487
488 static void TimerFinalizeScriptInstance(HScriptWorld script_world)
489 {
490 HContext context = GetScriptWorldContext(script_world);
491 lua_State* L = GetLuaState(context);
492 DM_LUA_STACK_CHECK(L, 0);
493
494 uintptr_t owner = dmScript::GetInstanceId(L);
495 HTimerWorld timer_world = GetTimerWorld(script_world);
496 KillTimers(timer_world, owner);
497
498 lua_pushinteger(L, (lua_Integer)TIMER_WORLD_VALUE_KEY_HASH);
499 lua_pushnil(L);
500 SetInstanceContextValue(L);
501 }
502
503 struct LuaTimerCallbackArgs
504 {

Callers

nothing calls this directly

Calls 8

GetScriptWorldContextFunction · 0.85
GetInstanceIdFunction · 0.85
GetTimerWorldFunction · 0.85
KillTimersFunction · 0.85
lua_pushintegerFunction · 0.85
lua_pushnilFunction · 0.85
SetInstanceContextValueFunction · 0.85
GetLuaStateFunction · 0.70

Tested by

no test coverage detected