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

Function UnrefInInstance

engine/script/src/script.cpp:1390–1410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1388 }
1389
1390 void UnrefInInstance(lua_State* L, int ref)
1391 {
1392 DM_LUA_STACK_CHECK(L, 0);
1393
1394 GetInstanceContextTable(L);
1395 // [-1] instance context table or LUA_NIL
1396
1397 if (lua_type(L, -1) != LUA_TTABLE)
1398 {
1399 // [-1] LUA_NIL
1400
1401 lua_pop(L, 1);
1402 return;
1403 }
1404 // [-1] instance context table
1405
1406 luaL_unref(L, -1, ref);
1407 // [-1] instance context table
1408
1409 lua_pop(L, 1);
1410 }
1411
1412 void ResolveInInstance(lua_State* L, int ref)
1413 {

Callers 5

HandleUnrefMessageFunction · 0.85
HandleMessageFunction · 0.85
TEST_FFunction · 0.85
RunScriptFunction · 0.85
DispatchCallbackDDFFunction · 0.85

Calls 3

GetInstanceContextTableFunction · 0.85
lua_typeFunction · 0.85
luaL_unrefFunction · 0.85

Tested by 2

TEST_FFunction · 0.68
DispatchCallbackDDFFunction · 0.68