vkDestroyInstance
To destroy an instance, call:
void vkDestroyInstance(
VkInstance instance,
const VkAllocationCallbacks* pAllocator);
pub fn destroy_instance(
instance: vk::Instance,
p_allocator: *const vk::AllocationCallbacks,
);
instanceis the handle of the instance to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Prior to destroying an instance, an application is responsible for
destroying/freeing any Vulkan objects with explicit vkDestroy* or
vkFree* commands that were created using that instance, or any
VkPhysicalDevice object retrieved from it, as the first parameter of
the corresponding vkCreate* or vkAllocate* command.
Valid Usage
VUID-vkDestroyInstance-instance-00629
All child objects that were created with instance or with a
VkPhysicalDevice retrieved from it, and that can be destroyed or
freed, must have been destroyed or freed prior to destroying
instance
VUID-vkDestroyInstance-instance-00630
If VkAllocationCallbacks were provided when instance was
created, a compatible set of callbacks must be provided here
VUID-vkDestroyInstance-instance-00631
If no VkAllocationCallbacks were provided when instance was
created, pAllocator must be NULL
Valid Usage (Implicit)
VUID-vkDestroyInstance-instance-parameter
If instance is not NULL, instance must be a valid VkInstance handle
VUID-vkDestroyInstance-pAllocator-parameter
If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
Host Synchronization
- Host access to
instancemust be externally synchronized - Host access to all
VkPhysicalDeviceobjects enumerated frominstancemust be externally synchronized