コード例 #1
0
ファイル: CGameProcedure.cs プロジェクト: zjljxsc/cshotfix
        //释放静态变量
        public static void ReleaseStaticMember()
        {
            if (s_BattleManager != null)
            {
                s_BattleManager.Destroy();
                s_BattleManager = null;
            }



            if (s_TimerManager != null)
            {
                s_TimerManager.Destroy();
                s_TimerManager = null;
            }
            //if (s_JBmanager != null)
            //{
            //    s_JBmanager.Destroy();
            //    s_JBmanager = null;
            //}

            MessageManager.UnregMessages();

            //NetworkManager.Destroy();


            //DataManager.Destroy();



            //释放所有的循环实例
            if (s_ProcLogIn != null)
            {
                s_ProcLogIn = null;
            }
            if (s_ProcBattle != null)
            {
                s_ProcBattle = null;
            }
            if (s_ProcLobby != null)
            {
                s_ProcLobby = null;
            }
            s_ProcPrev = s_ActiveProcedure = null;

            if (s_MainHotFixManager != null)
            {
                s_MainHotFixManager.OnApplicationQuit();
                s_MainHotFixManager.Destroy();
                s_MainHotFixManager = null;
            }
            if (s_MainHotFixManager_SystemDll != null)
            {
                s_MainHotFixManager_SystemDll.OnApplicationQuit();
                s_MainHotFixManager_SystemDll.Destroy();
                s_MainHotFixManager_SystemDll = null;
            }
            s_EventManager = null;

            //PrefabLoaderManager.Destroy();
        }