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.
This alone won't be that bad, not a real leak, and FileObject is quite small, but many IDE caches or helper maps use FileObject keyed weak hash maps that are not freed this way. Moreover, it makes runtime diagnostics using "Run time watches" much harder as the FileObject is used as the key as well. I believe using just the path (URI) would work well for given purpose.
Another example is editor document held through DiffSidebar Java Static References Static reference from org.netbeans.modules.openfile.RecentFiles.history (from class org.netbeans.modules.openfile.RecentFiles) : --> java.util.ArrayList@0x830a18a0 (20 bytes) (field elementData:) --> [Ljava.lang.Object;@0x843f3008 (124 bytes) (Element 19 of [Ljava.lang.Object;@0x843f3008:) --> org.netbeans.modules.openfile.RecentFiles$HistoryItem@0x8668d598 (20 bytes) (field file:) --> org.netbeans.modules.masterfs.MasterFileObject@0x843ff620 (21 bytes) (field listeners:) --> javax.swing.event.EventListenerList@0x843fff48 (12 bytes) (field listenerList:) --> [Ljava.lang.Object;@0x8702ccb8 (32 bytes) (Element 5 of [Ljava.lang.Object;@0x8702ccb8:) --> org.netbeans.modules.versioning.diff.DiffSidebar@0x86bc9a28 (385 bytes) (field document:) --> org.netbeans.modules.editor.NbEditorDocument@0x8668cce0 (192 bytes)
started...not a small rewrite...
fixed in main trunk: Checking in src/org/netbeans/modules/openfile/RecentFiles.java; /cvs/utilities/src/org/netbeans/modules/openfile/RecentFiles.java,v <-- RecentFiles.java new revision: 1.5; previous revision: 1.4 done Checking in src/org/netbeans/modules/openfile/RecentFileAction.java; /cvs/utilities/src/org/netbeans/modules/openfile/RecentFileAction.java,v <-- RecentFileAction.java new revision: 1.6; previous revision: 1.5 done Checking in test/unit/src/org/netbeans/modules/openfile/RecentFilesTest.java; /cvs/utilities/test/unit/src/org/netbeans/modules/openfile/RecentFilesTest.java,v <-- RecentFilesTest.java new revision: 1.3; previous revision: 1.2 done