Bug 73058 [Images] ImageDescriptor.createImage() javadoc needs dispose() reference
org.eclipse.jface.resource.ImageDescriptor.createImage() javadoc needs dispose reference. When creating images using the above call, the Javadoc just says that a new image is created. Reciently I had troubles with a "No more handles" bug, which turned out to be that I was never disposing of the images I had created. It would be very useful to have the Javadoc for the createImage() calls mention that all images must be explictly disposed of. Mentioning this might help other people avoid this problem in the future. Something along the lines of: Note: All Images created using this call must be explictly disposed of using the dispose() call. They will not be automatically garbage collected.
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ImageDescriptor.java
* @param returnMissingImageOnError flag that determines if a default image is returned on error
     * @param device the device on which to create the image
     * @return a new image or <code>null</code> if the image could not be created
     * @since 2.0
     */
    public Image createImage(boolean returnMissingImageOnError, Device device) {
        ImageData data = getImageData();
        if (data == null) {
            if (!returnMissingImageOnError) {
                return null;
            } else {
                data = DEFAULT_IMAGE_DATA;
            }
        }
        /*
         * Try to create the supplied image. If there is an SWT Exception try and create
         * the default image if that was requested. Return null if this fails.
         */
        try {
            if (data.transparentPixel >= 0) {
                ImageData maskData = data.getTransparencyMask();
                return new Image(device, data, maskData);
            }
            return new Image(device, data);
        } catch (SWTException exception) {
            if (returnMissingImageOnError) {
                try {
                    return new Image(device, DEFAULT_IMAGE_DATA);
                } catch (SWTException nextException) {
                    return null;