static int CleanPool_New(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         GameObjectManager.CleanPool_New();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#2
0
    /// <summary>
    /// 释放内存
    /// </summary>
    public static void FreeMemory()
    {
        GlobalEvent.DispatchEvent(MemoryEvent.FreeMemory);

        //清空对象池
        GameObjectManager.CleanPool();

        GameObjectManager.CleanPool_New();

        //清空缓存的UI
        UIManager.DestroyAllHideUI();

        FreeHeapMemory();

        //GC
        //GC.Collect();
    }