Re: JDOM parser reuse memory problem
Rolf Lear <[email protected]>
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <[email protected]> |
On 17/11/2011 11:51 AM, BIHANIC Laurent wrote: > Le 17/11/11 17:33, Rolf Lear a écrit : >> There is a bug though, and it could explain some confusion. >> >> The problem is the the XMLReader has had it's various handlers set to the >> SAXHandler (Content, DTD, Error, etc.) and when you re-use the XMLReader, you >> in effect keep a reference to the SAXHandler. >> >> Setting the SAXHandler to null at the end of the build does not cause the >> XMLReader to forget it's handlers. >> >> It is an issue that Randall identified a week or so ago. > OK. So maybe we should explicitly reset the Document reference in SAXHandler > (by adding a call to a protected method in the finally clause) and remove this > old fix. > > Regards, > > Laurent > > -- > When Randall alerted us to the issue I filed an 'issue' for it. There are a few options that have already been suggested, and it will take some experimentation to figure out which one is the best (or if there are other options). I just have not yet gotten around to it. It needs more time/investigation though to get the right solution. On the other hand, this back-and-forth has inspired me to update the issue with the suggestions-so-far: https://github.com/hunterhacker/jdom/issues/52 Rolf _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/[email protected]