protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { In.Dispose(); whiteTexture.Dispose(); } }
public void Dispose() { if (_ownReader) { In.Dispose(); } if (_ownWriter) { Out.Dispose(); } }
public void Dispose() { // On disposal, send a disconnect message Send(new DisconnectMessage(DisconnectType.Expected)); Stream.Dispose(); In.Dispose(); Out.Dispose(); Connection.Close(); }
public void Dispose() { Out?.Dispose(); Out = null; In?.Dispose(); In = null; Process?.Dispose(); Process = null; }
/// <summary> /// Releases any resources used by this instance. /// </summary> public void Dispose() { //Check if (isDisposed) { return; } //Dispose ms.Dispose(); Out.Dispose(); In.Dispose(); isDisposed = true; //Null ms = null; buffer = null; }