public void Dispose() { if (_asfMemoryStream != null) { _asfMemoryStream.Close(); _asfMemoryStream = null; } if (_asfStream != null) { _asfStream.Close(); } }
private void Dispose(bool disposing) { if (!_disposed) { if (disposing) //managed resources { if (_asfMemoryStream != null) { _asfMemoryStream.Close(); _asfMemoryStream = null; } if (_asfStream != null) { _asfStream.Close(); } } Marshal.FinalReleaseComObject(_syncReader); _disposed = true; } }