Bug 36526 ErrorDialog leaks a clipboard
Build: 2.1 The JFace ErrorDialog leaks a clipboard instance in the copyToClipboard method: private void copyToClipboard(){ StringBuffer statusBuffer = new StringBuffer(); populateCopyBuffer(status,statusBuffer,0); Clipboard clipboard = new Clipboard(list.getDisplay()); clipboard.setContents( new Object[] {statusBuffer.toString()}, new Transfer[] {TextTransfer.getInstance()} ); } clipboard.dispose() should be called at the end of this method.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/ErrorDialog.java
data.heightHint = list.getItemHeight() * LIST_ITEM_COUNT;
		data.horizontalSpan = 2;
		list.setLayoutData(data);
		list.setFont(parent.getFont());
		Menu copyMenu = new Menu(list);
		MenuItem copyItem = new MenuItem(copyMenu, SWT.NONE);
		copyItem.addSelectionListener(new SelectionListener() {
			/*
			 * @see SelectionListener.widgetSelected (SelectionEvent)
			 */
			public void widgetSelected(SelectionEvent e) {
				copyToClipboard();
			}
			/*
			 * @see SelectionListener.widgetDefaultSelected(SelectionEvent)
			 */
			public void widgetDefaultSelected(SelectionEvent e) {
				copyToClipboard();
			}
		});
		copyItem.setText(JFaceResources.getString("copy")); 
		list.setMenu(copyMenu);
		listCreated = true;
		return list;
	}
	/* (non-Javadoc)
	 * Method declared on Window.
	 */
	/**
	 * Extends <code>Window.open()</code>.