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.
Found a leaked closed project in a dev build. this org.netbeans.modules.apisupport.project.NbModuleProject project org.netbeans.modules.apisupport.project.Evaluator evaluator org.netbeans.spi.java.project.classpath.support.ProjectClassPathImplementation impl org.netbeans.api.java.classpath.ClassPath key java.util.HashMap$Entry [3] java.util.HashMap$Entry[] table java.util.HashMap map java.util.HashSet classPathsChanged org.netbeans.modules.parsing.impl.indexing.LogContext [16] org.netbeans.modules.parsing.impl.indexing.LogContext[] contexts org.netbeans.modules.parsing.impl.indexing.LogContext$RingTimeBuffer value java.util.HashMap$Entry [3] java.util.HashMap$Entry[] table java.util.HashMap history org.netbeans.modules.parsing.impl.indexing.LogContext$Stats STATS org.netbeans.modules.parsing.impl.indexing.LogContext Perhaps classPathsChanged and fileObjsChanged could be WeakSet's?
Thanks for report.
Fixed jet-main 1a0e47125012
I had considered Set<String> classPathsChanged but was worried this would not work correctly: a caller might add ClassPath@1 "a.jar" and later add ClassPath@1 "a.jar:b.jar" and you would have two entries rather than one; or a caller might add ClassPath@1 "a.jar" and then ClassPath@2 "a.jar" and you would have one entry rather than two. Not clear to me whether such things matter in this case. If they do, then a WeakSet<ClassPath> would probably work better.
This should not matter, the method is called in short time period when collecting source paths in GPR. The WeakReference<CP> will not work. The LogContext class keeps LogContexts executed in last 2 minutes. If it will try to get the CP from the weak reference if will be null for closed projects.
Integrated into 'main-golden', will be available in build *201206080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/1a0e47125012 User: Tomas Zezula <tzezula@netbeans.org> Log: #213632:Memory leak in LogContext