Пример #1
0
        private void LeasingChart_Unloaded(object sender, RoutedEventArgs e)
        {
            Unloaded -= LeasingChart_Unloaded;

            Subscribe(false);

            if (m_gridM != null)
            {
                m_gridM.Dispose();
                m_gridM = null;
            }

            if (m_barM != null)
            {
                m_barM.Dispose();
                m_barM = null;
            }

            if (m_textM != null)
            {
                m_textM.Dispose();
                m_textM = null;
            }

            if (m_rowLayoutM != null)
            {
                m_rowLayoutM.Dispose();
                m_rowLayoutM = null;
            }

            if (m_hightlightM != null)
            {
                m_hightlightM.Dispose();
                m_hightlightM = null;
            }

            if (m_rowM != null)
            {
                m_rowM.Dispose();
                m_rowM = null;
            }

            if (m_tooltipM != null)
            {
                m_tooltipM.Dispose();
                m_tooltipM = null;
            }
        }
Пример #2
0
        protected override void CleanupUnmanagedResources()
        {
            if (OutOfBoundsSelectionTimer != null)
            {
                StopOutOfBoundsSelection();
                OutOfBoundsSelectionTimer.Dispose();
            }

            if (painter.IsValueCreated)
            {
                painter.Value.Clear();
                painter.Value.Dispose();
            }

            UndoRedoManager.Dispose();
            RowManager.Dispose();
            base.CleanupUnmanagedResources();
        }