Browse Source

Merge pull request #37586 from qarmin/vulkan_allocator_leak

Fix leak with Vulkan allocator
Rémi Verschelde 5 years ago
parent
commit
597ec5dbf8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/vulkan/rendering_device_vulkan.cpp

+ 1 - 0
drivers/vulkan/rendering_device_vulkan.cpp

@@ -7049,6 +7049,7 @@ void RenderingDeviceVulkan::finalize() {
 	for (int i = 0; i < staging_buffer_blocks.size(); i++) {
 	for (int i = 0; i < staging_buffer_blocks.size(); i++) {
 		vmaDestroyBuffer(allocator, staging_buffer_blocks[i].buffer, staging_buffer_blocks[i].allocation);
 		vmaDestroyBuffer(allocator, staging_buffer_blocks[i].buffer, staging_buffer_blocks[i].allocation);
 	}
 	}
+	vmaDestroyAllocator(allocator);
 
 
 	while (vertex_formats.size()) {
 	while (vertex_formats.size()) {
 		Map<VertexFormatID, VertexDescriptionCache>::Element *temp = vertex_formats.front();
 		Map<VertexFormatID, VertexDescriptionCache>::Element *temp = vertex_formats.front();