public void TearDown() { if (view != null) { view.Dispose(); } if (xmlView != null) { xmlView.Dispose(); } }
/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose(bool disposing) { System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** "); // Must not be run more than once. if (IsDisposed) { return; } if (disposing) { if (components != null) { components.Dispose(); } if (m_view != null && !Controls.Contains(m_view)) { m_view.Dispose(); } if (m_detailView != null && !Controls.Contains(m_detailView)) { m_detailView.Dispose(); } } m_sel = null; m_cache = null; m_view = null; m_detailView = null; if (m_cdaTemp != null) { m_cdaTemp.ClearAllData(); Marshal.ReleaseComObject(m_cdaTemp); m_cdaTemp = null; } base.Dispose(disposing); }