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.
WebProject[C:\Sun\rave\perf\UniversityCrudApp]: private static java.util.HashMap org.netbeans.modules.visualweb.project.jsf.framework.JSFFrameworkProvider.propertyListeners-> java.util.HashMap@1a37931-table-> [Ljava.util.HashMap$Entry;@1aaec1a-[12]-> java.util.HashMap$Entry@1f5f0b3-key-> org.netbeans.modules.web.project.WebProject@6187dd To reproduce: 1) Open a visual web project 2) Open and close a page (may not be necessary) 3) Close the project The WebProject object is still being held in the propertyListeners map. An examination of the JSFFrameworkProvider source shows that listeners are never removed from the map.
Fixed in the trunk. Use WeakHashMap for holding the project property change listener instead of HashMap. BTW, it's a recent regression that is not in the NetBeans 6.0 release.
The WeakHashMap is keyed on the WebProject instance, but the WebProject instance is reachable from the map entry's value. This prevents the entry from being automatically removed. The GC root path is below: WebProject[C:\Documents and Settings\qn145415\My Documents\NetBeansProjects\WebApplication65]: private static final java.util.Map org.netbeans.modules.visualweb.project.jsf.framework.JSFFrameworkProvider.propertyListeners-> java.util.WeakHashMap@fb12ab-table-> [Ljava.util.WeakHashMap$Entry;@1c08758-[3]-> java.util.WeakHashMap$Entry@93c018-value-> java.util.ArrayList@e1b81e-elementData-> [Ljava.lang.Object;@1c282fe-[0]-> org.netbeans.modules.visualweb.project.jsf.ui.JSFNodeFactory$JSFNodeList@f5aa7a-project-> org.netbeans.modules.web.project.WebProject@1254e91
Don't declare static for the HashMap and don't static cache JSFFrameworkProvider to prevent memory leak. Now I don't see JSFFrameworkProvider in the Run-time Watches list.
It looks like the leak is fixed. However, you should consider using a normal HashMap instead of WeakHashMap since it doesn't work as expected anyway.