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
}
            } else
                return null;
        }
    }
    /**
     * Creates and returns a new SWT <code>ImageData</code> object
     * for this image descriptor.
     * Note that each call returns a new SWT image data object.
     * <p>
     * This framework method is declared public so that it is
     * possible to request an image descriptor's image data without
     * creating an SWT image object.
     * </p>
     * <p>
     * Returns <code>null</code> if the image data could not be created.
     * </p>
     *
     * @return a new image data or <code>null</code>
     */
    public abstract ImageData getImageData();
    /**
     * Returns the shared image descriptor for a missing image.
     *
     * @return the missing image descriptor
     */
    public static ImageDescriptor getMissingImageDescriptor() {
        return MissingImageDescriptor.getInstance();
    }
}