Linkgraph: Use an arena allocator for path objects.
Fixes leaks when job is aborted early.
This commit is contained in:
@@ -60,10 +60,7 @@ void FlowMapper::Run(LinkGraphJob &job) const
|
||||
}
|
||||
}
|
||||
/* Clear paths. */
|
||||
PathList &paths = node.Paths();
|
||||
for (PathList::iterator i = paths.begin(); i != paths.end(); ++i) {
|
||||
delete *i;
|
||||
}
|
||||
paths.clear();
|
||||
node.Paths().clear();
|
||||
}
|
||||
job.path_allocator.ResetArena();
|
||||
}
|
||||
|
Reference in New Issue
Block a user