Hi Chris, Chris Simmons <[EMAIL PROTECTED]> wrote on 02/05/2007 09:00:04 AM:
> Hi, > > I've been trying to track down memory leaks in our application and have > noticed that the XMLGrammarLoader internally retains hard references to > schema grammars after completing a parse. This occurs in the grammar > bucket and XSDHandler also keeps an import map, there may be other > places too. It does remove them on the next parse, but this kind of > thing tends to obscure real leaks. Discarding the parser is an option > but it isn't ideal as it seems to involve quite a performance overhead > compared with reusing the same parser. There are many more instances than that and probably hundreds of structures across the parser components which get cleared on reset or grow (e.g. the SymbolTable) as they're used. I understand that this makes it tough to monitor the memory usage but these aren't memory leaks [1]. > I've also found that XSDHandler also has a field 'fParent' which appears > to be a stack of XSObject's. This is never cleared, only grown as > required, which means that an object that finds its way into here may > well never be garbage collected. Yeah, we should probably be clearing that. > Thanks, > > Chris Simmons. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] [1] http://en.wikipedia.org/wiki/Memory_leak#Is_it_a_memory_leak.3F 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]