void Dispose(bool disposing) { if (m_disposed) { return; } if (disposing) { // Managed cleanup code here, while managed refs still valid DH.Dispose(ref m_stream); } m_disposed = true; }