protected override void Dispose(bool disposing) { _output = _output.SafeDispose(); if (disposing) { _rawOutput.SafeDispose(); } _rawOutput = null; _transform = _transform.SafeDispose(); if (disposing) { var alg = _algorithm as IDisposable; alg.SafeDispose(); } _algorithm = null; base.Dispose(disposing); }