Fix a couple minor memory leaks
continuous-integration/drone/pr Build is failing Details

pull/47/head
Caleb Cornett 2024-02-07 07:33:23 -06:00
parent 248aa956ac
commit 69df00398e
1 changed files with 5 additions and 4 deletions

View File

@ -599,7 +599,7 @@ static void D3D11_DestroyDevice(
SDL_free(uniformBuffer->d3d11Buffer); SDL_free(uniformBuffer->d3d11Buffer);
SDL_free(uniformBuffer); SDL_free(uniformBuffer);
} }
SDL_free(renderer->availableCommandBuffers); SDL_free(renderer->availableUniformBuffers);
/* Release the mutexes */ /* Release the mutexes */
SDL_DestroyMutex(renderer->acquireCommandBufferLock); SDL_DestroyMutex(renderer->acquireCommandBufferLock);
@ -1905,8 +1905,6 @@ static void D3D11_QueueDestroyGraphicsPipeline(
SDL_free(d3dGraphicsPipeline->vertexStrides); SDL_free(d3dGraphicsPipeline->vertexStrides);
} }
/* FIXME: Release uniform buffers, once that's written in */
SDL_free(d3dGraphicsPipeline); SDL_free(d3dGraphicsPipeline);
} }
@ -2488,7 +2486,7 @@ static uint8_t D3D11_INTERNAL_CreateSwapchain(
res = IDXGISwapChain_GetParent( res = IDXGISwapChain_GetParent(
swapchain, swapchain,
&D3D_IID_IDXGIFactory1, &D3D_IID_IDXGIFactory1,
(void**) &pParent /* FIXME: Does pParent need to get released? (Same for FNA3D) */ (void**) &pParent
); );
if (FAILED(res)) if (FAILED(res))
{ {
@ -2512,6 +2510,9 @@ static uint8_t D3D11_INTERNAL_CreateSwapchain(
res res
); );
} }
/* We're done with the parent now */
IDXGIFactory1_Release(pParent);
} }
/* Create the swapchain data */ /* Create the swapchain data */