Atmo.UI.DevEx.MainForm.Dispose C# (CSharp) Method

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void
        protected override void Dispose(bool disposing)
        {
            if (disposing) {
                if (components != null) {
                    components.Dispose();
                }
                try {
                    if (_deviceConnection is IDisposable) {
                        (_deviceConnection as IDisposable).Dispose();
                    }
                }
                catch (Exception ex) {
                    Log.Warn("Shutdown problem: device connection.", ex);
                }

                try {
                    if (_dbStore is IDisposable) {
                        (_dbStore as IDisposable).Dispose();
                    }
                }
                catch (Exception ex) {
                    Log.Warn("Shutdown problem: database.", ex);
                }
            }
            base.Dispose(disposing);
        }
MainForm