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 207413 - Memory leak in ClassPathUtils.loaders
Summary: Memory leak in ClassPathUtils.loaders
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2012-01-17 21:00 UTC by Jesse Glick
Modified: 2012-06-19 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 Jesse Glick 2012-01-17 21:00:38 UTC
Dev build. Had opened and later closed a number of projects and files within them, including at least one form in some module projects. Later found that the project was still in memory.

this	org.netbeans.modules.apisupport.project.NbModuleProject	#27
project	org.netbeans.modules.apisupport.project.Evaluator	#29
evaluator	org.netbeans.spi.java.project.classpath.support.ProjectClassPathImplementation	#54
impl	org.netbeans.api.java.classpath.ClassPath	#103
classPath	org.netbeans.api.java.classpath.ClassLoaderSupport	#1
projectClassLoaderDelegate	org.netbeans.modules.form.project.ProjectClassLoader	#2
projectClassLoader	org.netbeans.modules.form.project.FormClassLoader	#2
value	java.util.WeakHashMap$Entry	#41477
[6]	java.util.WeakHashMap$Entry[]	#2288 (16 items)
table	java.util.WeakHashMap	#1775
loaders	org.netbeans.modules.form.project.ClassPathUtils	class ClassPathUtils

Looking at sources, it is clearly wrong - the value in the WeakHashMap will typically refer strongly to the key, so the entries will never be cleared.
Comment 1 Jan Stola 2012-06-19 13:50:21 UTC
Fixed.

Modified file: http://hg.netbeans.org/jet-main/rev/6fd3256238d4