MCPcopy Create free account
hub / github.com/Tencent/xLua / LuaGC

Function LuaGC

Assets/XLua/Src/StaticLuaCallbacks.cs:158–178  ·  view source on GitHub ↗
(RealStatePtr L)

Source from the content-addressed store, hash-verified

156 }
157
158 [MonoPInvokeCallback(typeof(LuaCSFunction))]
159 public static int LuaGC(RealStatePtr L)
160 {
161 try
162 {
163 int udata = LuaAPI.xlua_tocsobj_safe(L, 1);
164 if (udata != -1)
165 {
166 ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
167 if ( translator != null )
168 {
169 translator.collectObject(udata);
170 }
171 }
172 return 0;
173 }
174 catch (Exception e)
175 {
176 return LuaAPI.luaL_error(L, "c# exception in LuaGC:" + e);
177 }
178 }
179
180 [MonoPInvokeCallback(typeof(LuaCSFunction))]
181 public static int ToString(RealStatePtr L)

Callers

nothing calls this directly

Calls 4

xlua_tocsobj_safeMethod · 0.80
FindMethod · 0.80
collectObjectMethod · 0.80
luaL_errorMethod · 0.80

Tested by

no test coverage detected