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.

Bug 14947 - Please remove static icons and data from BeanInfos
Summary: Please remove static icons and data from BeanInfos
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: akemr
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 14943
  Show dependency tree
 
Reported: 2001-08-30 12:39 UTC by Petr Nejedly
Modified: 2003-06-30 13:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2001-08-30 12:39:41 UTC
There are *BeanInfo classes which uses static images and even static
initializers holding the 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.

The sources to modify which I know of:
AutoupdateTypeBeanInfo.java
SettingsBeanInfo.java
XMLAutoupdateTypeBeanInfo.java

I'm setting it P2 because these classes get loaded and resoved
during every IDE start and the data is holds stays (mostly) uselessly
on the heap throughout all the session.

Please also consider making nonstatic ImageIcons in:
ResultListCellRenderer.java
SelectedListCellRenderer.java
Comment 1 akemr 2001-09-13 13:23:57 UTC
Fixed in main trunk.
Comment 2 Petr Nejedly 2001-09-13 14:03:00 UTC
Verified.

You could also get rid of the static Bundle, but that will
have no impact unless you'll remove the static Bundles
from the rest of the module.

(Why: Because at the startup, AU's settings are loaded which
bring in the bundle and never release it, although user
will not see the strings throughout the rest of the session)
Comment 3 Quality Engineering 2003-06-30 13:50:46 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.