EXSLT method that return Node leaking memory

"Scooper Ong" <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
We have an EXSLT java method causing massive memory leak.  When the method 
is called many times during the transformation, we can actually get the JVM 
to use up to 3Gig of memory.  This is an excerpt of the method, with 
non-relevant code striped out for clarify.  Can anybody see a problem in our 
code, or are we tickling a XALAN bug?

    public Node leakyExsltMethod(...) {

        DocumentBuilderFactory factory = 
DocumentBuilderFactory.newInstance();
        Document d = factory.newDocumentBuilder().parse(new 
InputSource(...));
        Node node = d.getDocumentElement();
        DocumentFragment docfrag = d.createDocumentFragment();
        docfrag.appendChild(node);
        return(docfrag);
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.