public override void OnRelease() { if (this.stDeskInfo != null) { this.stDeskInfo.Release(); this.stDeskInfo = null; } this.dwLeftMs = 0u; 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.stHeroSwapInfo != null) { this.stHeroSwapInfo.Release(); this.stHeroSwapInfo = null; } }
public CSDT_RECONN_ADJUSTINFO() { 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.stHeroSwapInfo = (CSDT_RECONN_ADJUST_STATE_EXTRA)ProtocolObjectPool.Get(CSDT_RECONN_ADJUST_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.stHeroSwapInfo = (CSDT_RECONN_ADJUST_STATE_EXTRA)ProtocolObjectPool.Get(CSDT_RECONN_ADJUST_STATE_EXTRA.CLASS_ID); }