Skip to content

Commit

Permalink
finally fixing memory leak fix #14034
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Nov 11, 2023
1 parent 4c0fd85 commit 456d294
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/router/ROPerson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,13 @@ ROPerson::computeRoute(const RORouterProvider& provider,
}
if (cost < bestCost) {
bestCost = cost;
while (!best.empty()) {
delete best.back();
best.pop_back();
}
best.swap(resultItems);
bestVeh = carUsed ? v : nullptr;
best.swap(resultItems);
}
for (TripItem* const it : resultItems) {
delete it;
}
resultItems.clear();
}
}
trip->setItems(best, bestVeh);
Expand Down

0 comments on commit 456d294

Please sign in to comment.