-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vmaDestroyBuffer() destroy everything but VkDeviceMemory #401
Comments
Function An allocation represents a piece of device memory.
You don't need to think about it as long as you respect the correct order of deinitialization, which is:
So, my main question is: Did you call |
I have the same question and calling the vmaDestroyAllocator didnt do the trick |
I managed to do a very brief MRE, minimal reproducible example. vmaDestroyBuffer(m_allocator, m_vertex_buffer.buffer, m_vertex_buffer.allocation);
vmaDestroyAllocator(m_allocator); e.g. [2024-03-29 17:47:02.921] [info] validation layer: Validation Error: [ VUID-vkDestroyDevice-device-05137 ] Object 0: handle = 0x908683000000001d, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0x4872eaa0 | vkCreateDevice(): OBJ ERROR : For VkDevice 0x11729a118[], VkDeviceMemory 0x908683000000001d[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device |
Do make sure to destroy the allocator prior to the device according to deinitialization order as mentioned by @adam-sawicki-a ; not doing so is only case where I seem to be able to reproduce that error |
When I vmaDestroyBuffer(), at object destruction, it doesn't destroy VkDeviceMemory hMemory, resulting in error:
after i destroy my device.
The text was updated successfully, but these errors were encountered: