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.
There is a cache of DocumentBuilders in XMLUtil, using ThreadLocals. This cache should speed up DOM parsing, but it seems it can also leak last parsed document for each thread and builder setup. The sample reference chain is: jaxp.DocumentBuilderImpl.domParser-> ...parsers.DOMParser.fDocumentSource-> ...dtd.XMLDTDValidator.fDocumentSource-> ...impl.XMLDocumentScannerImpl.fDTDDecl-> ...util.XMLStringBuffer.ch-> char[<maybe really big>] This issue is best manifested from Plugin Manager which parses really large module catalogs, so the leak can be in order of megabytes.
Petre, please do evaluation of the leak.
There is a reset() method on the DocumentBuilder, but it is useless in the apache's impl, as it doesn't delegate to the inner DOMParser's reset() method and the builder doesn't allow access to the parser instance. I had to resort to no caching of DOM parsers. Whoever needs to do bulk DOM Parsing, they should cache a parser themselves and free it once the bulk block is done. openide/util/src/org/openide/xml/XMLUtil.java,v1.15 openide/util/test/unit/src/org/openide/xml/XMLUtilTest.java,v1.10
Bummer. Did you file a bug for Xerces?
No, I didn't. I guess it is supposed to call inner reset(), but I wasn't sure. and the documentation was not clear either IIRC.
*** Bug 85446 has been marked as a duplicate of this bug. ***