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

Function Unref

engine/script/src/script.cpp:1584–1596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1582 }
1583
1584 void Unref(lua_State* L, int table, int reference)
1585 {
1586 if (reference == LUA_NOREF)
1587 {
1588 return;
1589 }
1590 if (g_LuaReferenceCount <= 0)
1591 {
1592 dmLogError("Unbalanced number of Lua refs - possibly double calls to dmScript::Unref");
1593 }
1594 --g_LuaReferenceCount;
1595 luaL_unref(L, table, reference);
1596 }
1597
1598 int GetLuaRefCount()
1599 {

Callers 15

LuaCurveReleaseFunction · 0.85
DeleteScriptFunction · 0.85
DeleteScriptInstanceFunction · 0.85
FinalizeFunction · 0.85
DeleteScriptWorldFunction · 0.85
DestroyCallbackFunction · 0.85
DeleteUserTypeFunction · 0.85
TEST_FFunction · 0.85
DeleteScriptInstanceFunction · 0.85

Calls 1

luaL_unrefFunction · 0.85

Tested by 6

DeleteUserTypeFunction · 0.68
TEST_FFunction · 0.68
DeleteScriptInstanceFunction · 0.68
TearDownMethod · 0.68