예제 #1
0
 public virtual void Dispose()
 {
     if (this.IsFromPool)
     {
         ReferencePool.Recycle(this);
     }
 }
예제 #2
0
        public void Release()
        {
            Reset();

            if (null != mIconLoader)
            {
                ReferencePool.Recycle(mIconLoader);
                mIconLoader = null;
            }
        }
예제 #3
0
        private void DisposeComponents()
        {
            for (int i = mComponentList.Count - 1; i >= 0; --i)
            {
                var tmpComponent = mComponentList[i];
                tmpComponent.Dispose();
                ReferencePool.Recycle(tmpComponent);
            }

            mComponentList.Clear();
            mComponentDict.Clear();
        }
예제 #4
0
            public void Release()
            {
                SkillBase = null;

                if (null != IconLoader)
                {
                    ReferencePool.Recycle(IconLoader);
                    IconLoader = null;
                }

                IconImg.sprite = null;
                SetActive(IconImg, false);
            }
예제 #5
0
        private void UpdateComponents(float deltaTime)
        {
            for (int i = mComponentList.Count - 1; i >= 0; --i)
            {
                var tmpComponent = mComponentList[i];

                if (tmpComponent.IsDispose)
                {
                    ReferencePool.Recycle(tmpComponent);
                    mComponentList.RemoveAt(i);
                }
                else
                {
                    tmpComponent.Update(deltaTime);
                }
            }
        }