## C Specification

To destroy a VkDebugUtilsMessengerEXT object, call:

// Provided by VK_EXT_debug_utils
void vkDestroyDebugUtilsMessengerEXT(
VkInstance                                  instance,
VkDebugUtilsMessengerEXT                    messenger,
const VkAllocationCallbacks*                pAllocator);

## Parameters

• instance is the instance where the callback was created.

• messenger is the VkDebugUtilsMessengerEXT object to destroy. messenger is an externally synchronized object and must not be used on more than one thread at a time. This means that vkDestroyDebugUtilsMessengerEXT must not be called when a callback is active.

• pAllocator controls host memory allocation as described in the Memory Allocation chapter.

## Description

Valid Usage
• If VkAllocationCallbacks were provided when messenger was created, a compatible set of callbacks must be provided here

• If no VkAllocationCallbacks were provided when messenger was created, pAllocator must be NULL

Valid Usage (Implicit)
• instance must be a valid VkInstance handle

• If messenger is not VK_NULL_HANDLE, messenger must be a valid VkDebugUtilsMessengerEXT handle

• If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure

• If messenger is a valid handle, it must have been created, allocated, or retrieved from instance

Host Synchronization
• Host access to messenger must be externally synchronized

The application must ensure that vkDestroyDebugUtilsMessengerEXT is not executed in parallel with any Vulkan command that is also called with instance or child of instance as the dispatchable argument.