summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2020-04-06 18:07:31 +0200
committerqarmin <mikrutrafal54@gmail.com>2020-04-06 18:07:31 +0200
commitf4301b7259c4ac66c0e6bb1067ec4c6b3ea4cf32 (patch)
treeb720a1e68a1ac3f654a08260f5cb5ac016ae7981 /drivers
parent94fab213482fd944debc50e255e7b395d391cc33 (diff)
Fixed leak with vertex_formats
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index 69957d9939..ba0ba6c5a5 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -7049,6 +7049,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());