Reordering of operations frees some memory earlier
This commit is contained in:
parent
ff50cfb4da
commit
92f9a29de1
@ -121,10 +121,10 @@ int main (int argc, char *argv[]) {
|
|||||||
boost::property_tree::ptree speedProfile;
|
boost::property_tree::ptree speedProfile;
|
||||||
boost::property_tree::ini_parser::read_ini("speedprofile.ini", speedProfile);
|
boost::property_tree::ini_parser::read_ini("speedprofile.ini", speedProfile);
|
||||||
EdgeBasedGraphFactory * edgeBasedGraphFactory = new EdgeBasedGraphFactory (nodeBasedNodeNumber, edgeList, bollardNodes, trafficLightNodes, inputRestrictions, internalToExternalNodeMapping, speedProfile, SRTM_ROOT);
|
EdgeBasedGraphFactory * edgeBasedGraphFactory = new EdgeBasedGraphFactory (nodeBasedNodeNumber, edgeList, bollardNodes, trafficLightNodes, inputRestrictions, internalToExternalNodeMapping, speedProfile, SRTM_ROOT);
|
||||||
edgeList.clear();
|
|
||||||
std::vector<ImportEdge>().swap(edgeList);
|
std::vector<ImportEdge>().swap(edgeList);
|
||||||
|
|
||||||
edgeBasedGraphFactory->Run();
|
edgeBasedGraphFactory->Run();
|
||||||
|
std::vector<_Restriction>().swap(inputRestrictions);
|
||||||
NodeID edgeBasedNodeNumber = edgeBasedGraphFactory->GetNumberOfNodes();
|
NodeID edgeBasedNodeNumber = edgeBasedGraphFactory->GetNumberOfNodes();
|
||||||
std::vector<EdgeBasedEdge> edgeBasedEdgeList;
|
std::vector<EdgeBasedEdge> edgeBasedEdgeList;
|
||||||
edgeBasedGraphFactory->GetEdgeBasedEdges(edgeBasedEdgeList);
|
edgeBasedGraphFactory->GetEdgeBasedEdges(edgeBasedEdgeList);
|
||||||
@ -149,7 +149,6 @@ int main (int argc, char *argv[]) {
|
|||||||
mapOutFile.close();
|
mapOutFile.close();
|
||||||
|
|
||||||
std::vector<NodeInfo>().swap(internalToExternalNodeMapping);
|
std::vector<NodeInfo>().swap(internalToExternalNodeMapping);
|
||||||
std::vector<_Restriction>().swap(inputRestrictions);
|
|
||||||
|
|
||||||
INFO("initializing contractor");
|
INFO("initializing contractor");
|
||||||
Contractor* contractor = new Contractor( edgeBasedNodeNumber, edgeBasedEdgeList );
|
Contractor* contractor = new Contractor( edgeBasedNodeNumber, edgeBasedEdgeList );
|
||||||
|
Loading…
Reference in New Issue
Block a user