Re: Memory leak.

2005-12-21 Thread Christopher Brooks
Hi Kevin, Yep, this looks like a leak of some sort. In MoMLParser, _parser is declared as: private XmlParser _parser = new XmlParser(); I'm not sure if setting _parser to null in 1326 of MoMLParser.parse(URL, Reader) is safe or not. What happens the next time this method is called with the

Re: Memory leak.

2005-12-21 Thread Kevin Ruland
Christopher, Christopher Brooks wrote: Hi Kevin, Yep, this looks like a leak of some sort. In MoMLParser, _parser is declared as: private XmlParser _parser = new XmlParser(); I'm not sure if setting _parser to null in 1326 of MoMLParser.parse(URL, Reader) is safe or not. What happens the

Re: Memory leak.

2005-12-21 Thread Edward A. Lee
At 12:29 AM 12/21/2005 -0800, Christopher Brooks wrote: Yep, this looks like a leak of some sort. In MoMLParser, _parser is declared as: private XmlParser _parser = new XmlParser(); I'm confused... Wouldn't the leak then actually be in the creation of multiple instances of MoMLParser with

Re: Memory leak.

2005-12-21 Thread Kevin Ruland
Edward, I don't fully understand the situation and defer to you or Christopher for greater details. Perhaps there is something in the Kepler code which is holding onto a MoMLParser too long. In kepler there is this code in ActorMetadata.ActorMetadata( InputStream moml): { MoMLParser pa

Re: Memory leak.

2005-12-21 Thread Edward A. Lee
Kevin: You are right... When a parser is used to open a model, the model itself acquires an instance of ParserAttribute, which contains a reference to the parser. Thus, as long as there is an active reference to the model, there will be a reference to the parser. We could perhaps change Parser