SWDEV-482692, SWDEV-485802, SWDEV-485489 - Handle refcounts owned by graph for user objects.
Change-Id: Ic739ab1ec5d3dc3143e3ae70f9591922bc0e3d9f
[ROCm/clr commit: e74ac6f580]
Esse commit está contido em:
1 pai
3130b4639f
commit
b31bf885a3
3 files changed
+64
-11
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Bloquear um usuário