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.
It seems that there is major leak in versioning, see the following reference path: org.netbeans.modules.java.JavaDataObject@14c5754[MasterFileObject@c92575[space/nenik/work/nb/performance/insanelib/src/org/netbeans/insane/impl/SmallObjectMap.java]]: private static org.netbeans.modules.versioning.spi.VCSContext org.netbeans.modules.versioning.spi.VCSContext.contextCached-> org.netbeans.modules.versioning.spi.VCSContext@133d7e5-nodes-> [Lorg.openide.nodes.Node;@32aa93-[4]-> org.openide.nodes.FilterNode@20b6e7-original-> org.netbeans.modules.java.JavaNode@5f10ca-obj-> org.netbeans.modules.java.JavaDataObject@14c5754 I opened a package worth of java files, collapsed the explorer, restarted the IDE (to prevent interference with other potential leak through nodes+navigator) and closed all the editors (one after one to prevent another leak in uilogger). I then tried to gc() everything, but the editors got stuck in memory, which I revealed using Window->Runtime watches (the list) and the "find refs" action, which produced the above listed output.
Note: You have to close the files one-by-one after restart also because of lazy loading. They are not actually loaded before you switch to them for the first time in the session.
I think I can reference contextCached weakly. But this should not cause any serious leak because there is only one cached VCSContext at any one time.
VCSContext is now cached via WeakReference. /shared/data/ccvs/repository/versioncontrol/src/org/netbeans/modules/versioning/spi/VCSContext.java,v <-- VCSContext.java new revision: 1.5; previous revision: 1.4
The fix in trunk really helps.
Verified in NetBeans IDE Dev (Build 20070327-0828) 1.5.0_11; Java HotSpot(TM) Client VM 1.5.0_11-b03 Windows XP version 5.1 running on x86 en_GB (nb); Cp1252
Merged into 6.0M8. /shared/data/ccvs/repository/versioncontrol/src/org/netbeans/modules/versioning/spi/VCSContext.java,v <-- VCSContext.java new revision: 1.4.4.1; previous revision: 1.4