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.
100723-8a8635566258. I had several NBM and Maven projects open and had done some full-text searches when I noticed RAM usage staying near the max, 500M. I closed all the projects; closed all tabs in the Usages, Output Window, and Search windows that might have contained data related to these projects; opened an unrelated small j2seproject and closed it, in case there was some cache of last-selected nodes; and did several forced GCs. The memory consumption stayed around 300M, and jmap -histo showed all the projects still loaded in memory. I ran jhat on the dump and got a GC root reference trace for one of the Maven projects. This showed ProjectAwareCodeStylePreferences being the critical link so far as I can tell; singleton.cache holds Project's in its values, yet these Project's could strongly refer to the keys, namely NbEditorDocument's. This seemed to be the case in at least one instance: the NbMavenProjectImpl holds a document for pom.xml (via POMModelImpl). A WeakHashMap entry cannot be collected so long as the value refers to the key. The proper solution is for the values to be weak (or perhaps soft) references.
I will try to fix this.
http://hg.netbeans.org/jet-main/rev/376b8370f38f
Should Map<String, Csp> csps = cspsRef.get(); be Map<String, Csp> csps = cspsRef != null ? cspsRef.get() : null; ?
It already is thanks to Lahvac http://hg.netbeans.org/jet-main/rev/0a7741c6d111 who fixed it faster than I noticed all our tests failure.