public void Init(UIScrollListParentNew <MODEL, VIEW> parent, MODEL model, int modelIndex) { this.parent = parent; this.model = model; this.modelIndex = modelIndex; if (model != null) { if (initCoroutine != null) { StopCoroutine(initCoroutine); initCoroutine = null; } initCoroutine = StartCoroutine(InitializeCoroutine(model)); } }
private void OnDestroy() { OnCallDestroy(); if (background != null) { background.RemoveFromPanel(); } background = null; parent = null; if (initCoroutine != null) { StopCoroutine(initCoroutine); } initCoroutine = null; model = (MODEL)null; }
private void OnDestroy() { this.OnCallDestroy(); if (this.background != null) { this.background.RemoveFromPanel(); } this.background = null; this.parent = null; if (this.initCoroutine != null) { base.StopCoroutine(this.initCoroutine); } this.initCoroutine = null; this.model = (MODEL)((object)null); }