Linkgraph: Fix a memory leak when aborting job early.
This commit is contained in:
@@ -228,7 +228,7 @@ void LinkGraphJob::AbortJob()
|
||||
void LinkGraphJob::Init()
|
||||
{
|
||||
uint size = this->Size();
|
||||
this->nodes.Resize(size);
|
||||
this->nodes.resize(size);
|
||||
this->edges.Resize(size, size);
|
||||
for (uint i = 0; i < size; ++i) {
|
||||
this->nodes[i].Init(this->link_graph[i].Supply());
|
||||
@@ -257,8 +257,6 @@ void LinkGraphJob::EdgeAnnotation::Init()
|
||||
void LinkGraphJob::NodeAnnotation::Init(uint supply)
|
||||
{
|
||||
this->undelivered_supply = supply;
|
||||
new (&this->flows) FlowStatMap;
|
||||
new (&this->paths) PathList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -52,7 +52,7 @@ private:
|
||||
void Init(uint supply);
|
||||
};
|
||||
|
||||
typedef SmallVector<NodeAnnotation, 16> NodeAnnotationVector;
|
||||
typedef std::vector<NodeAnnotation> NodeAnnotationVector;
|
||||
typedef SmallMatrix<EdgeAnnotation> EdgeAnnotationMatrix;
|
||||
|
||||
friend const SaveLoad *GetLinkGraphJobDesc();
|
||||
|
Reference in New Issue
Block a user