If my measurements are right, WAYYYY better now. Missed a huge memory leak, now like 0.34147GB, I think
This commit is contained in:
@@ -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 ;
|
||||
|
||||
@@ -286,7 +286,9 @@ void Parser::closure(State* state) {
|
||||
state->remaining.push_back(currentGramRule);
|
||||
stateTotal = state->getTotal();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
delete currentGramRule;
|
||||
}
|
||||
}
|
||||
}
|
||||
//std::cout << state->toString() << std::endl;
|
||||
@@ -322,7 +324,9 @@ 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
|
||||
//Also, this really only needs to be done for the state's basis, but we're already iterating through, so...
|
||||
|
||||
Reference in New Issue
Block a user