VKDESTROYDEVICE(3)

NAME
vkDestroyDevice - Destroy a logical device

C SPECIFICATION

To destroy a device, call:

    void vkDestroyDevice(
        VkDevice                                    device,
        const VkAllocationCallbacks*                pAllocator);

PARAMETERS

    • device is the logical device to destroy.

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

DESCRIPTION

To ensure that no work is active on the device, vkDeviceWaitIdle can be used to gate the destruction of the device. Prior to destroying a device, an application is responsible for destroying/freeing any Vulkan objects that were created using that device as the first parameter of the corresponding vkCreate* or vkAllocate* command.

    Note

    The lifetime of each of these objects is bound by the lifetime of the VkDevice object. Therefore, to avoid resource leaks, it is critical that an application explicitly free all of these resources prior to calling vkDestroyDevice.

Valid Usage

    • All child objects created on device must have been destroyed prior to destroying device

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

    • If no VkAllocationCallbacks were provided when device was created, pAllocator must be NULL
Valid Usage (Implicit)

    • If device is not NULL, device must be a valid VkDevice handle

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

    • Host access to device must be externally synchronized

SEE ALSO

VkAllocationCallbacks, VkDevice

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkDestroyDevice

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.