diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-06 21:32:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 21:32:25 +0200 |
commit | befbdda7f269cae440640b88e3cbf8fbb7e6a614 (patch) | |
tree | a2d9d72ef0163e45d02402b653837b15bfaaf49e /drivers/vulkan/rendering_device_vulkan.cpp | |
parent | 0d4d96d4b0d7b219f13206b300e7fcf802f228bb (diff) | |
parent | f4301b7259c4ac66c0e6bb1067ec4c6b3ea4cf32 (diff) |
Merge pull request #37635 from qarmin/leak_vertex
Fixed leak with vertex_formats
Diffstat (limited to 'drivers/vulkan/rendering_device_vulkan.cpp')
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 5e4143c960..5f9dabcaa6 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -7050,6 +7050,13 @@ void RenderingDeviceVulkan::finalize() { vmaDestroyBuffer(allocator, staging_buffer_blocks[i].buffer, staging_buffer_blocks[i].allocation); } + while (vertex_formats.size()) { + Map<VertexFormatID, VertexDescriptionCache>::Element *temp = vertex_formats.front(); + memdelete_arr(temp->get().bindings); + memdelete_arr(temp->get().attributes); + vertex_formats.erase(temp); + } + //all these should be clear at this point ERR_FAIL_COND(descriptor_pools.size()); ERR_FAIL_COND(dependency_map.size()); |