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
protected Image getImage() {
		if (status != null) {
			if (status.getSeverity() == IStatus.WARNING)
				return JFaceResources.getImageRegistry().get(DLG_IMG_WARNING);
			if (status.getSeverity() == IStatus.INFO)
				return JFaceResources.getImageRegistry().get(DLG_IMG_INFO);
		}
		
		return JFaceResources.getImageRegistry().get(DLG_IMG_ERROR);
	}
	/**
	 * Create this dialog's drop-down list component.
	 *
	 * @param parent the parent composite
	 * @return the drop-down list component
	 */
	protected List createDropDownList(Composite parent) {
		
		list =
			new List(
				parent,
				SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
		
		populateList(list);
		GridData data =
			new GridData(
				GridData.HORIZONTAL_ALIGN_FILL
					| GridData.GRAB_HORIZONTAL
					| GridData.VERTICAL_ALIGN_FILL
					| GridData.GRAB_VERTICAL);