protected virtual void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!this.disposed) { // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { // Dispose managed resources. this._Currency = null; this._CurrentTurn = null; this._DiscardPile = null; this._DrawPile = null; this._Game = null; this._Hand = null; this._MessageRequestQueue = null; this._MessageResponseQueue = null; this._PlayerMats = null; this._SetAside = null; this._Private = null; this._Revealed = null; this._InPlay = null; this._TokenPiles = null; } // Call the appropriate methods to clean up // unmanaged resources here. // If disposing is false, // only the following code is executed. // Note disposing has been done. disposed = true; } }
protected virtual void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!this.disposed) { // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { // Dispose managed resources. this._Game = null; this._SupplyPiles = null; this._SpecialPiles = null; this._TokenPiles = null; this._SupplyKeys = null; this._Trash = null; } // Call the appropriate methods to clean up // unmanaged resources here. // If disposing is false, // only the following code is executed. // Note disposing has been done. disposed = true; } }