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
        private void OnKryptonContextMenuClosed(object sender, EventArgs e)
        {
            // Cast to correct type
            KryptonContextMenu kcm = (KryptonContextMenu)sender;

            // Unhook from context menu and dipose of it, we only use each menu instance once
            kcm.Closed -= OnKryptonContextMenuClosed;
            kcm.Dispose();

            // Remove the fixed appearnce of the view button
            _pressedButtonController.RemoveFixed();
            _pressedButtonController = null;

            // No longer showing context menu, so safe to show another one
            _showingContextMenu = false;
        }