This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
DiffSettingsBeanInfo uses static images and static BIs data. This is considered a memory leak in this context. For loading images, use org.openide.util.Utilities.loadImage directly in getImage without any caching (Utilities will do SoftCaching for you). Create BeanDeascriptor and PropertyDescriptors just on demand without any caching, Introspector will cache it itself. You can look at beaninfos in org.netbeans.beaninfo for an example.
Fixed in the main trunk. The class simplified, all static fields removed with the exception of icon names. /cvs/diff/src/org/netbeans/modules/diff/DiffSettingsBeanInfo.java,v <-- DiffSettingsBeanInfo.java new revision: 1.5; previous revision: 1.4
The static data is gone, thanks. What about the icons? Do you plan to provide some later? Is that complicated code necessary? Most of the BIs use simple public Image getIcon(int type) { if ((type == BeanInfo.ICON_COLOR_16x16) || (type == BeanInfo.ICON_MONO_16x16) return Utilities.loadImage("org/.....gif"); // NOI18N else return Utilities.loadImage("org/....32.gif); // NOI18N } And if you don't have icons yet, you can omit the code at all.
> What about the icons? Do you plan to provide some later? Well, maybe, I'm not sure whether it will be necessary. > Is that complicated code necessary? At first I wanted to delete the whole getIcon() method body and 4 pointers to icon names and return just null. But the structure may be handy later if I decide to add the icons and the 4 static empty pointers do not seem to me as a big problem. But to have a clean bytecode, I've removed the 4 static empty pointers, commented the method body and return just null :-) /cvs/diff/src/org/netbeans/modules/diff/DiffSettingsBeanInfo.java,v <-- DiffSettingsBeanInfo.java new revision: 1.6; previous revision: 1.5
Better. Eventually you may comment out the whole method as SimpleBeanInfo does return null for you already ;-)
You're nitpicking ;-) You've ask for it: /cvs/diff/src/org/netbeans/modules/diff/DiffSettingsBeanInfo.java,v <-- DiffSettingsBeanInfo.java new revision: 1.7; previous revision: 1.6