Esempio n. 1
0
        /// <summary>
        /// 清理内存
        /// </summary>
        public static void ClearMemory()
        {
            GC.Collect(); Resources.UnloadUnusedAssets();
            LuaManager mgr = AppFacade.Instance.GetManager <LuaManager>(ManagerName.Lua);

            if (mgr != null)
            {
                mgr.LuaGC();
            }
        }
 static int LuaGC(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         MyFrameWork.LuaManager obj = (MyFrameWork.LuaManager)ToLua.CheckObject(L, 1, typeof(MyFrameWork.LuaManager));
         obj.LuaGC();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }