[antlr-interest] c++ memory leaks
marc_schellens
m_schellens at hotmail.com
Sun Mar 3 23:54:18 PST 2002
Looking closer onto the generated lexer, one finds:
MyLexer::MyLexer(std::istream& in)
: antlr::CharScanner(new antlr::CharBuffer(in))
{
setCaseSensitive(false);
initLiterals();
}
So here is a new CharBuffer alloccated on the heap.
But where is it freed?
MyLexer hasn't a destructor and ~CharScanner() does nothing.
I would say thats a memory leak, or what am I missing?
thanks,
marc
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list