mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
Fix for memory leak
This commit is contained in:
parent
a8fc0d2cbd
commit
9eca80396a
1 changed files with 4 additions and 3 deletions
|
@ -91,7 +91,7 @@ public class UPCParser extends PrsStream implements RuleAction , IParserActionTo
|
|||
for (int i = 0; i < unimplemented_symbols.size(); i++)
|
||||
{
|
||||
Integer id = (Integer) unimplemented_symbols.get(i);
|
||||
System.out.println(" " + UPCParsersym.orderedTerminalSymbols[id.intValue()]);//$NON-NLS-1$
|
||||
System.out.println(" " + UPCParsersym.orderedTerminalSymbols[id.intValue()]);//$NON-NLS-1$
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
|
@ -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