コード例 #1
0
 public void Dispose()
 {
     mModulars?.Dispose();
     mCreators?.Reset();
     mDecorators?.Reset();
     mLIsteners?.Reset();
 }
コード例 #2
0
ファイル: UIContainer.cs プロジェクト: firefishes/ShipDock
        protected override void Purge()
        {
            int initNotice = GetInstanceID();

            initNotice.Remove(OnInitUISubgroup);

            mUISubgroup?.Dispose();

            mUIChangerTasker?.Clean();
            m_UINodes?.Clear();
            NodesControl?.Clear();
        }
コード例 #3
0
        public virtual void Dispose()
        {
            int noticeName;
            ModularNoticeCreater creater;

            ModularNoticeCreater[] createrList = NoticeCreates;
            int max = createrList != default ? createrList.Length : 0;

            for (int i = 0; i < max; i++)
            {
                creater    = createrList[i];
                noticeName = creater.NoticeName;
                Modulars.RemoveNoticeCreater(noticeName, creater.Handler);
            }
            ModularNoticeDecorater decorater;

            ModularNoticeDecorater[] decoraterList = NoticeDecoraters;
            max = decoraterList != default ? decoraterList.Length : 0;
            for (int i = 0; i < max; i++)
            {
                decorater  = decoraterList[i];
                noticeName = decorater.NoticeName;
                Modulars.RemoveNoticeDecorator(noticeName, decorater.Handler);
            }
            ModularNoticeListener listener;

            ModularNoticeListener[] listenerList = NoticeListeners;
            max = listenerList != default ? listenerList.Length : 0;
            for (int i = 0; i < max; i++)
            {
                listener   = listenerList[i];
                noticeName = listener.NoticeName;
                noticeName.Remove(listener.Handler);
            }

            Purge();

            mModularNotifierMapper?.Dispose();
            mModularNotifierMapper = default;
            Modulars = default;
        }
コード例 #4
0
ファイル: StateMachines.cs プロジェクト: firefishes/ShipDock
        public void Dispose()
        {
            var           list = mFSMMapper.Keys;
            IStateMachine fsm  = default;
            int           max  = list.Count;

            for (int i = 0; i < max; i++)
            {
                fsm = mFSMMapper.GetValue(list[i]);
#if ILRUNTIME
                fsm?.Dispose();
#else
                Utils.Reclaim(fsm);
#endif
            }

#if ILRUNTIME
            mFSMMapper?.Dispose();
#else
            Utils.Reclaim(ref mFSMMapper);
#endif
        }
コード例 #5
0
        public void Dispose()
        {
            mFieldMapper?.Dispose();

            Owner = default;
        }