protected override void Dispose(bool disposing) { if (disposing) { foreach (var x in ContinuousEffects) { x.Dispose(); } ContinuousEffects.Clear(); } }
protected virtual void Dispose(bool disposing) { if (disposing) { foreach (var x in ExtraTurns) { x.Dispose(); } ExtraTurns = null; foreach (var x in Players) { x.Dispose(); } Players.Clear(); foreach (var x in DelayedTriggeredAbilities) { x.Dispose(); } DelayedTriggeredAbilities.Clear(); ResolvingSpellAbilities = null; foreach (var x in ResolvingSpells) { x.Dispose(); } ResolvingSpells = null; foreach (var x in Turns) { x.Dispose(); } Turns.Clear(); foreach (var x in ContinuousEffects) { x.Dispose(); } ContinuousEffects.Clear(); } }