[antlr-interest] Re: Memory Leak?
lgcraymer
lgc at mail1.jpl.nasa.gov
Sat Jun 5 17:16:47 PDT 2004
That is probably right-- CommonAST::~CommonAST() does not delete its
"text" field; CommonToken has a similar "feature" since it inherits
its destructor from Token. That may not be easy to fix, short of
adding ref-counted strings. Ric may have a suggestion.
--Loring
--- In antlr-interest at yahoogroups.com, Peggy Fieland
<madcapmaggie at y...> wrote:
> From what I can tell from my investigations, it's
> storage for strings allocated by ANTLR when building
> the trees that isn't getting freed.
>
>
> --- Mark Lentczner <markl at g...> wrote:
> > > Sounds like this is C++, yes?
> > In my project we invoke an Antlr generated C++
> > lexer, parser and tree
> > parser several hundred times during the unit tests
> > on start-up. We
> > test strenuously for memory leaks - and we are not
> > leaking in any of
> > these tests.
> >
> > Now, of course, we may not be making use of all the
> > features of Antlr,
> > and so, may not be hitting a bug that you are. But,
> > you should look
> > strongly at the semantic actions embeded the
> > grammar - and ensure that
> > they are not leaking.
> >
> > - Mark
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> > antlr-interest-unsubscribe at yahoogroups.com
> >
> >
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends. Fun. Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list