/** Dispose all of the cached images. */ public static void disposeImages() { SWTResourceManager.disposeImages(); // dispose ImageDescriptor images { for (Iterator<Image> I = m_descriptorImageMap.values().iterator(); I.hasNext(); ) { I.next().dispose(); } m_descriptorImageMap.clear(); } // dispose decorated images for (int i = 0; i < m_decoratedImageMap.length; i++) { Map<Image, Map<Image, Image>> cornerDecoratedImageMap = m_decoratedImageMap[i]; if (cornerDecoratedImageMap != null) { for (Map<Image, Image> decoratedMap : cornerDecoratedImageMap.values()) { for (Image image : decoratedMap.values()) { image.dispose(); } decoratedMap.clear(); } cornerDecoratedImageMap.clear(); } } // dispose plugin images { for (Iterator<Image> I = m_URLImageMap.values().iterator(); I.hasNext(); ) { I.next().dispose(); } m_URLImageMap.clear(); } }
/** Dispose all of the cached images */ public static void disposeImages() { SWTResourceManager.disposeImages(); // for (Iterator<Image> I = m_DescriptorImageMap.values().iterator(); I.hasNext(); ) I.next().dispose(); m_DescriptorImageMap.clear(); }
/** * Dispose of cached objects and their underlying OS resources. This should only be called when * the cached objects are no longer needed (e.g. on application shutdown). */ public static void dispose() { disposeColors(); disposeImages(); disposeFonts(); disposeCursors(); }