mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 07:15:39 +02:00
Fix for memory leak
This commit is contained in:
parent
a8fc0d2cbd
commit
9eca80396a
1 changed files with 4 additions and 3 deletions
|
@ -172,8 +172,8 @@ public class UPCParser extends PrsStream implements RuleAction , IParserActionTo
|
|||
}
|
||||
|
||||
|
||||
private UPCParserAction action = null;
|
||||
private List commentTokens = null;
|
||||
private UPCParserAction action = new UPCParserAction (this, UPCParserprs.orderedTerminalSymbols);
|
||||
private List commentTokens = new ArrayList();
|
||||
private IKeywordMap keywordMap = new UPCKeywordMap ();
|
||||
|
||||
public UPCParser() { // constructor
|
||||
|
@ -240,6 +240,7 @@ public IParseResult parse() {
|
|||
boolean encounteredError = action.encounteredError();
|
||||
IASTCompletionNode compNode = action.getASTCompletionNode();
|
||||
|
||||
resetTokenStream(); // important, allows memory to be reclaimed
|
||||
return new C99ParseResult(tu, compNode, encounteredError);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue