public void Clear() { if (refer != null) { Refer.DetachDeactive(refer, onDeacive); refer = null; } type = null; func = null; parent = null; }
void RemoveLoadItem(LoadItem item_) { if (item_.referId != null) { Refer.DetachDeactive(item_.referId, onDeactive); } item_.Clear(); m_itemList.Remove(item_); m_itemPool.Push(item_); }
void ReleaseBy(string referId_) { if (!m_ref2imgHash.ContainsKey(referId_)) { return; } HashSet <Image> imageHash = m_ref2imgHash[referId_]; m_ref2imgHash.Remove(referId_); Image image; var enumerator = imageHash.GetEnumerator(); while (enumerator.MoveNext()) { image = enumerator.Current; image.sprite = null; m_image2ref.Remove(image); } if (m_itemQueue.Count > 0) { string referId = referId_ as string; for (int i = m_itemQueue.Count - 1; i >= 0; --i) { if (m_itemQueue[i].referId == referId) { RemoveLoadItem(m_itemQueue[i]); //移除加载项 } } } Refer.DetachDeactive(referId_, OnDeactive); }
static void ClearEvent() { m_mainLoader.Detach(LOAD_EVT.COMPLETE, onMainLoadEvt); Refer.DetachDeactive(onReferDeactive); }
protected override void ClearEvent() { base.ClearEvent(); Refer.DetachDeactive(onReferDeactive); }