public virtual void Dispose() { if (this.IsFromPool) { ReferencePool.Recycle(this); } }
public void Release() { Reset(); if (null != mIconLoader) { ReferencePool.Recycle(mIconLoader); mIconLoader = null; } }
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(); }
public void Release() { SkillBase = null; if (null != IconLoader) { ReferencePool.Recycle(IconLoader); IconLoader = null; } IconImg.sprite = null; SetActive(IconImg, false); }
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); } } }