Ejemplo n.º 1
0
        private void DestroyGame(string _key)
        {
            if (!mGameMap.ContainsKey(_key))
            {
                return;
            }

            DLog.LogWarning("准备释放一个GameCore,同时摧毁App相关所有UnityInterface. AppName = " + _key);
            mGameMap[_key].Dispose();
            mGameMap.Remove(_key);
            DLog.LogWarning("释放GameCore结束. AppName = " + _key);
        }
Ejemplo n.º 2
0
        override protected void DisposeNoGcCode()
        {
            DLog.LogWarning("准备释放AppCore.");
            System.Collections.Generic.List <string> tlist = new System.Collections.Generic.List <string>(mGameMap.Keys);
            foreach (string tkey in tlist)
            {
                DestroyGame(tkey);
            }

            System.Collections.Generic.List <string> tpublicmonos = new System.Collections.Generic.List <string>(mPublicMonoMap.Keys);
            foreach (string tkey in tlist)
            {
                MonoManagerBase tmono = mPublicMonoMap[tkey];
                mPublicMonoMap.Remove(tkey);
                tmono.DestroyManager();
            }
            base.DisposeNoGcCode();
        }