Update WFGraphNode

This commit is contained in:
XieHan
2020-10-15 14:17:21 +08:00
parent daf2d7c7f9
commit 38f364fdef
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -30,14 +30,18 @@ SubTask *WFGraphNode::done()
this->user_data = (void *)1;
}
else
delete this;
return series->pop();
}
WFGraphNode::~WFGraphNode()
{
if (this->user_data)
{
for (WFGraphNode *node : this->successors)
node->WFCounterTask::count();
delete this;
}
return series->pop();
}
WFGraphNode& WFGraphTask::create_graph_node(SubTask *task)
+1 -1
View File
@@ -47,7 +47,7 @@ protected:
protected:
WFGraphNode() : WFCounterTask(0, nullptr) { }
virtual ~WFGraphNode() { }
virtual ~WFGraphNode();
friend class WFGraphTask;
};