Recursively delete all command buffer nodes to avoid leak

This commit is contained in:
baldurk committed 2024-04-08 11:47:25 +01:00
1 parent fcb8730132
commit 0795c75246
2 files changed
+12

No files matched your search

+3
View File
@@ -206,7 +206,10 @@ WrappedVulkan::~WrappedVulkan()
}
for(size_t i = 0; i < m_Partial.commandTree.size(); i++)
{
m_Partial.commandTree[i]->DeleteChildren();
delete m_Partial.commandTree[i];
}
delete m_Replay;
}
+9
View File
@@ -662,6 +662,15 @@ private:
rdcarray<CommandBufferNode *> childCmdNodes;
CommandBufferNode *rootNode = NULL;
bool renderPassActive = false;
void DeleteChildren()
{
for(CommandBufferNode *child : childCmdNodes)
{
child->DeleteChildren();
delete child;
}
}
};
// CommandBufferExecuteInfo tracks the position of the execution of a secondary command buffer