public static void GC(IntPtr ptr, int p, UnityEngine.Object o) { // set ud's metatable is nil avoid gc again LuaNativeMethods.lua_pushnil(ptr); LuaNativeMethods.lua_setmetatable(ptr, p); ObjectCache t = ObjectCache.Get(ptr); t.GC(o); }
public static int LuaGC(IntPtr ptr) { int index = LuaNativeMethods.luaS_rawnetobj(ptr, 1); if (index > 0) { ObjectCache t = ObjectCache.Get(ptr); t.GC(index); } return(0); }