예제 #1
0
        public void Dispose()
        {
            var disp = m_PixelImageProvider as IDisposable;

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

            if (m_Controller != null)
            {
                m_Controller.OnFramePixels          -= m_Controller_OnFramePixels;
                m_Controller.OnPotentialIntegration -= OnPotentialIntegration;
                m_Controller.Dispose();
                m_Controller = null;
            }
        }
예제 #2
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                if (m_IntegrationDetectionController != null)
                {
                    m_IntegrationDetectionController.OnPotentialIntegration -= DisplayFoundIntegration;
                    m_IntegrationDetectionController.OnFrameData            -= OnFrameData;
                    m_IntegrationDetectionController.OnBeginProgress        -= m_IntegrationDetectionController_OnBeginProgress;
                    m_IntegrationDetectionController.OnProgress             -= m_IntegrationDetectionController_OnProgress;

                    if (m_AllowPixDetExport)
                    {
                        m_IntegrationDetectionController.OnFramePixels -= m_IntegrationDetectionController_OnFramePixels;
                    }

                    m_IntegrationDetectionController.Dispose();
                }

                components.Dispose();
            }
            base.Dispose(disposing);
        }