Valgrind reports some memory leaks in the C++ runtime on revision aa909ddcb16ed74f571f5 related to ParserATNSimulator
and SingletonPredictionContext
.
Log: https://gist.github.com/Naios/041853b195dce6de43a2bdd66d4004f3
Im using the lexer and parser as following:
```c++
GeneratedLexer lexer(&input);
auto errorListener = createDiagnosticListener(this);
lexer.removeErrorListeners();
lexer.addErrorListener(errorListener.get());
auto tokens = std::make_shared
...
GeneratedParser parser(tokens.get());
parser.removeErrorListeners();
parser.addErrorListener(errorListener.get());
auto compilationUnit = parser.compilationUnit(); // compilationUnit is freed by the antlr4 runtime
LocalScopeVisitor localScopeVisitor(compilationUnit_, astContext);
compilationUnit->accept(&localScopeVisitor);
````
I'll see what I can do there...
@mike-lischke memory leaks in the cpp runtime causes me pain in an interpreter where I re-eval repeatedly, so it adds up quickly. Any progress on this one?
To be honest, I can't say when I come around to look at this. So many things on the agenda. But I keep trying...
Oracle, are you listening? Please fund Mike so he can work 20% on Antlr. It will become so good that you can use it as the Java 10 parser.
@pureformat Have you done any recent checks again? Could be this issue is solved now.
Most helpful comment
Oracle, are you listening? Please fund Mike so he can work 20% on Antlr. It will become so good that you can use it as the Java 10 parser.