SWDEV-482692, SWDEV-485802, SWDEV-485489 - Handle refcounts owned by graph for user objects.
Change-Id: Ic739ab1ec5d3dc3143e3ae70f9591922bc0e3d9f
This commit is contained in:
committato da
Jaydeepkumar Patel
parent
164cbcc531
commit
e74ac6f580
@@ -357,9 +357,12 @@ Graph* Graph::clone(std::unordered_map<Node, Node>& clonedNodes) const {
|
||||
}
|
||||
clonedNodes[node]->SetDependencies(clonedDependencies);
|
||||
}
|
||||
for (auto userObj : graphUserObj_) {
|
||||
userObj->retain();
|
||||
for (auto& userObj : graphUserObj_) {
|
||||
userObj.first->retain();
|
||||
newGraph->graphUserObj_.insert(userObj);
|
||||
// Clone graph should have its separate graph owned ref count = 1
|
||||
newGraph->graphUserObj_[userObj.first] = 1;
|
||||
userObj.first->owning_graphs_.insert(newGraph);
|
||||
}
|
||||
// Clone the root nodes to the new graph
|
||||
if (roots_.size() > 0) {
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user