public override void OnRelease() { if (this.stDeskInfo != null) { this.stDeskInfo.Release(); this.stDeskInfo = null; } this.dwLeftMs = 0; if (this.astCampInfo != null) { for (int i = 0; i < this.astCampInfo.Length; i++) { if (this.astCampInfo[i] != null) { this.astCampInfo[i].Release(); this.astCampInfo[i] = null; } } } if (this.stFreeHero != null) { this.stFreeHero.Release(); this.stFreeHero = null; } if (this.stFreeHeroSymbol != null) { this.stFreeHeroSymbol.Release(); this.stFreeHeroSymbol = null; } if (this.stPickStateExtra != null) { this.stPickStateExtra.Release(); this.stPickStateExtra = null; } }
public CSDT_RECONN_PICKINFO() { for (int i = 0; i < 2; i++) { this.astCampInfo[i] = (CSDT_RECONN_CAMPPICKINFO)ProtocolObjectPool.Get(CSDT_RECONN_CAMPPICKINFO.CLASS_ID); } this.stFreeHero = (COMDT_FREEHERO)ProtocolObjectPool.Get(COMDT_FREEHERO.CLASS_ID); this.stFreeHeroSymbol = (COMDT_FREEHERO_INACNT)ProtocolObjectPool.Get(COMDT_FREEHERO_INACNT.CLASS_ID); this.stPickStateExtra = (CSDT_RECONN_PICK_STATE_EXTRA)ProtocolObjectPool.Get(CSDT_RECONN_PICK_STATE_EXTRA.CLASS_ID); }
public override void OnUse() { this.stDeskInfo = (COMDT_DESKINFO)ProtocolObjectPool.Get(COMDT_DESKINFO.CLASS_ID); if (this.astCampInfo != null) { for (int i = 0; i < this.astCampInfo.Length; i++) { this.astCampInfo[i] = (CSDT_RECONN_CAMPPICKINFO)ProtocolObjectPool.Get(CSDT_RECONN_CAMPPICKINFO.CLASS_ID); } } this.stFreeHero = (COMDT_FREEHERO)ProtocolObjectPool.Get(COMDT_FREEHERO.CLASS_ID); this.stFreeHeroSymbol = (COMDT_FREEHERO_INACNT)ProtocolObjectPool.Get(COMDT_FREEHERO_INACNT.CLASS_ID); this.stPickStateExtra = (CSDT_RECONN_PICK_STATE_EXTRA)ProtocolObjectPool.Get(CSDT_RECONN_PICK_STATE_EXTRA.CLASS_ID); }