/// <summary> /// 清理内存 /// </summary> public static void ClearMemory() { GC.Collect(); Resources.UnloadUnusedAssets(); LuaManager mgr = AppFacade.LuaManager; if (mgr != null) { mgr.LuaGC(); } }
/// <summary> /// 清理内存 /// </summary> public static void ClearMemory() { GC.Collect(); Resources.UnloadUnusedAssets(); LuaManager mgr = AppFacade.Instance.GetManager <LuaManager>(ManagerName.Lua); if (mgr != null) { mgr.LuaGC(); } }
public static void ClearMemory() { GC.Collect(); Resources.UnloadUnusedAssets(); LuaManager manager = AppFacade.Instance.GetManager <LuaManager>("LuaScriptMgr"); if (manager != null) { manager.LuaGC(); } }
static int LuaGC(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaFramework.LuaManager obj = (LuaFramework.LuaManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.LuaManager)); obj.LuaGC(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }