ComponentFactory.Krypton.Toolkit.KryptonSplitterPanelDesigner.Dispose C# (CSharp) Method

Dispose() protected method

Releases the resources used by the KryptonSplitterPanelDesigner.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing)
                {
                    // Get access to the component change service
                    IComponentChangeService service = (IComponentChangeService)GetService(typeof(IComponentChangeService));

                    // Must unhook our event from the service so we can be garbage collected
                    if (service != null)
                        service.ComponentChanged -= new ComponentChangedEventHandler(OnComponentChanged);
                }
            }
            finally
            {
                // Ensure base class is always disposed
                base.Dispose(disposing);
            }
        }