I have a Vulkan memory mapping which has the same lifetime as its corresponding VkDeviceMemory. Currently I am unmapping it before the VkDeviceMemory gets destroyed. However, I am wondering about whether this step is compulsory as avoiding it will reduce my class' memory footprint.
Trying it with validation layers enabled does not complain, however this error detection might not be implemented.
So, is it compulsory to unmap Vulkan memory before deallocating it?
Edit: documentation is not explicit about it