Bug 26221 [Perspectives] Noticeable menubar "flash" when switching perspectives
Build 20021113 Note this is Windows XP. Open a Java Perspective. Open a Java Browsing Perspective. Switch back and forth between the two. On my XP machine I can visibly see the menu bar "shrink" as menu items are removed, then "expand" as menu items are added. It actually looks like it's animated. Anyway, very noticeable and somewhat strange since I'm switching between two perspectives that have the same base menus (i.e., the menu bar for each perspective is the same).
bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java
/**
 * Disposes of this menu manager and frees all allocated SWT resources.
 * Note that this method does not clean up references between this menu
 * manager and its associated contribution items.
 * Use <code>removeAll</code> for that purpose.
 */
public void dispose() {
	if (menuExist())
		menu.dispose();
	menu = null;
	
	if (menuItem != null) {
		menuItem.dispose();
		menuItem = null;
	}
}
/* (non-Javadoc)
 * Method declared on IContributionItem.
 */
public void fill(Composite parent) {}
/* (non-Javadoc)
 * Method declared on IContributionItem.
 */
public void fill(Menu parent, int index) {
	if (menuItem == null || menuItem.isDisposed()) {
		if (index >= 0)
			menuItem = new MenuItem(parent, SWT.CASCADE, index);
		else
			menuItem = new MenuItem(parent, SWT.CASCADE);
		menuItem.setText(menuText);