"BERVOETS Wim" <[EMAIL PROTECTED]> wrote on 09/13/2006 05:34:39 AM:
> Hi all, > > I would like to keep a pool of LSParsers objects which can be used > by my application for parsing XML. > I'm using Commons Pool for the implementation of the pool where I'm > using a BaseKeyedPoolableObjectFactory for creating the LSInputs, > LSOutputs, LSSerializers and LSParsers. > > It works nicely and much faster as I don't have to create the parser > object anymore but I'm seeing that some memory is leaking on the > LSParsers. (it seems the xml document I parsed with it stays in > memory when I put back the LSParser object in the pool) > > I guess this is normal because I couldn't find any sort of clear() > or reset() method on the LS* objects. > > I would like to know if it's possible to add some kind of clear() > /reset() method on the LS* objects which I can call when I return > the LS* objects back to the pool ? The Xerces implementation of LSParser has a reset() method but it isn't part of the DOM interface. You won't need to call that though. I just modified Xerces' LSParser (and DocumentBuilder) so that they drop their internal references to the DOM they just built. This will make it into Xerces 2.8.1 which should be available some time tonight. > kind regards, > Wim Bervoets Thanks. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]