Bug 87856 [Commands] Last closed editor leaked due to reference by command manager
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/CommandManager.java
final String commandId = command.getId();
			final boolean commandIdAdded = command.isDefined();
			if (commandIdAdded) {
				definedCommandIds.add(commandId);
			} else {
				definedCommandIds.remove(commandId);
			}
			fireCommandManagerChanged(new CommandManagerEvent(this, commandId,
					commandIdAdded, true, null, false, false));
		}
	}
	/**
	 * Notifies all of the listeners to this manager that the set of defined
	 * command identifiers has changed.
	 * 
	 * @param commandManagerEvent
	 *            The event to send to all of the listeners; must not be
	 *            <code>null</code>.
	 */
	private final void fireCommandManagerChanged(
			final CommandManagerEvent commandManagerEvent) {
		if (commandManagerEvent == null)
			throw new NullPointerException();
		if (listeners != null) {
			final Iterator listenerItr = listeners.iterator();
			while (listenerItr.hasNext()) {
				final ICommandManagerListener listener = (ICommandManagerListener) listenerItr
						.next();
				listener.commandManagerChanged(commandManagerEvent);
			}