Reduce finished path memory usage

This commit is contained in:
Anuken
2022-10-01 11:35:35 -04:00
parent 8db01e6aa2
commit 8752dbb978

View File

@@ -576,16 +576,14 @@ public class ControlPathfinder{
result.reverse();
smoothPath();
}else{
//don't keep this around in memory, better to dump entirely - using clear() keeps around massive arrays for invalid paths
frontier = new PathfindQueue();
cameFrom = new IntIntMap();
costs = new IntFloatMap();
}
done = true;
//don't keep this around in memory, better to dump entirely - using clear() keeps around massive arrays for paths
frontier = new PathfindQueue();
cameFrom = new IntIntMap();
costs = new IntFloatMap();
//TODO free resources?
done = true;
}
void smoothPath(){