private void OnReceiveMemoryWarning(string msg) { float currTime = Time.realtimeSinceStartup; if (currTime - m_TimeOfLastGC > gcInterval) { LogMgr.W("内存警告, 强制回收内存"); AssetsMgr.GC(); m_TimeOfLastGC = currTime; } else { LogMgr.W("过于频繁了,等会再回收"); } }
private static int GC(ILuaState lua) { AssetsMgr.GC(); return(0); }