private void Form1_FormClosed(object sender, FormClosedEventArgs e) { // Release pointers if (m_dev != null) { m_dev.Dispose(); m_dev = null; } if (m_Previewer != null) { m_Previewer.Dispose(); m_Previewer = null; } }