Fix memory leak in vkQueueWaitIdle

There was a missing autorelease pool. Fixes #2223.
This commit is contained in:
Owen Morgan 2024-05-03 09:51:10 +01:00
parent e361c2ae67
commit 9893b3ac25

View File

@ -145,9 +145,12 @@ VkResult MVKQueue::waitIdle(MVKCommandUse cmdUse) {
VkResult rslt = _device->getConfigurationResult();
if (rslt != VK_SUCCESS) { return rslt; }
auto* mtlCmdBuff = getMTLCommandBuffer(cmdUse);
[mtlCmdBuff commit];
[mtlCmdBuff waitUntilCompleted];
@autoreleasepool {
auto* mtlCmdBuff = getMTLCommandBuffer(cmdUse);
[mtlCmdBuff commit];
[mtlCmdBuff waitUntilCompleted];
}
return VK_SUCCESS;
}