If my measurements are right, WAYYYY better now. Missed a huge memory leak, now like 0.34147GB, I think

This commit is contained in:
Nathan Braswell
2015-03-23 15:52:25 -04:00
parent 6fa06f2b7e
commit b01078e7a0
2 changed files with 7 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ path_part = forward_slash alphanumeric | back_slash alphanumeric ;
forward_slash = "/" ;
back_slash = "\\" ;
# all for optional semicolons k
# all for optional semicolons k k
line_break = "
+" ;
actual_white = "( | )+" | line_break | line_break actual_white | "( | )+" actual_white ;

View File

@@ -286,6 +286,8 @@ void Parser::closure(State* state) {
state->remaining.push_back(currentGramRule);
stateTotal = state->getTotal();
}
} else {
delete currentGramRule;
}
}
}
@@ -322,6 +324,8 @@ void Parser::addStates(std::vector< State* >* stateSets, State* state, std::queu
State* newState = new State(stateSets->size()+newStates.size(),advancedRule, state);
newStates.push_back(newState);
}
} else {
delete advancedRule;
}
//Also add any completed rules as reduces in the action table
//See if reduce