vkDestroyImage(3)

# vkDestroyImage(3) Manual Page

## Name

vkDestroyImage - Destroy an image object

Loading… please wait.

## C Specification

To destroy an image, call:

    // Provided by VK_VERSION_1_0
    void vkDestroyImage(
        VkDevice                                    device,
        VkImage                                     image,
        const VkAllocationCallbacks*                pAllocator);

## Parameters

- `device` is the logical device that destroys the image.

- `image` is the image to destroy.

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

## Description

Valid Usage

- VUID-vkDestroyImage-image-01000
  All submitted commands that refer to `image`, either directly or via a `VkImageView`, must have completed execution

- VUID-vkDestroyImage-image-01001
  If `VkAllocationCallbacks` were provided when `image` was created, a compatible set of callbacks must be provided here

- VUID-vkDestroyImage-image-01002
  If no `VkAllocationCallbacks` were provided when `image` was created, `pAllocator` must be `NULL`

- VUID-vkDestroyImage-image-04882
  `image` must not have been acquired from vkGetSwapchainImagesKHR

Valid Usage (Implicit)

- VUID-vkDestroyImage-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkDestroyImage-image-parameter
  If `image` is not VK_NULL_HANDLE, `image` must be a valid VkImage handle

- VUID-vkDestroyImage-pAllocator-parameter
  If `pAllocator` is not `NULL`, `pAllocator` must be a valid pointer to a valid VkAllocationCallbacks structure

- VUID-vkDestroyImage-image-parent
  If `image` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `image` must be externally synchronized

## See Also

VK_VERSION_1_0, VkAllocationCallbacks, VkDevice, VkImage

## Document Notes

For more information, see the Vulkan Specification

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

## Copyright

Copyright 2014-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0