SIL.FieldWorks.Common.Widgets.FwComboBox.Dispose C# (CSharp) Метод

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
Результат void
		protected override void Dispose(bool disposing)
		{
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
				if (m_comboTextBox != null)
					m_comboTextBox.KeyPress -= m_comboTextBox_KeyPress;

				if (m_button != null)
					m_button.KeyPress -= m_button_KeyPress;

				if (ListBox != null)
				{
					ListBox.SelectedIndexChanged -= m_listBox_SelectedIndexChanged;
					ListBox.SameItemSelected -= m_listBox_SameItemSelected;
				}
			}
			if (m_tssPrevious != null)
			{
				Marshal.ReleaseComObject(m_tssPrevious);
				m_tssPrevious = null;
			}

			base.Dispose(disposing);
		}