@Override public void dispose() { if (this.widget != null) { this.widget.dispose(); this.widget = null; } disposeOldImages(); super.dispose(); }
/* * (non-Javadoc) * * @see org.eclipse.jface.action.ContributionItem#dispose() */ public void dispose() { if (elementRef != null) { commandService.unregisterElement(elementRef); elementRef = null; } if (commandListener != null) { command.getCommand().removeCommandListener(commandListener); commandListener = null; } command = null; commandService = null; disposeOldImages(); super.dispose(); }