mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-09-17 02:32:04 +00:00
Handle cleaning up of commandPool which caused memory leak when resizing
This commit is contained in:
@@ -2375,7 +2375,7 @@ static VkResult VULKAN_CreateSwapChain(SDL_Renderer *renderer, int w, int h)
|
||||
rendererData->fences = NULL;
|
||||
}
|
||||
if (rendererData->commandBuffers) {
|
||||
vkResetCommandPool(rendererData->device, rendererData->commandPool, 0);
|
||||
vkFreeCommandBuffers(rendererData->device, rendererData->commandPool, rendererData->swapchainImageCount, rendererData->commandBuffers);
|
||||
SDL_free(rendererData->commandBuffers);
|
||||
rendererData->commandBuffers = NULL;
|
||||
rendererData->currentCommandBuffer = VK_NULL_HANDLE;
|
||||
|
||||
Reference in New Issue
Block a user