vkDestroyCommandPool(3)

# vkDestroyCommandPool(3) Manual Page

## Name

vkDestroyCommandPool - Destroy a command pool object

Loading... please wait.

## C Specification

To destroy a command pool, call:

    void vkDestroyCommandPool(
        VkDevice                                    device,
        VkCommandPool                               commandPool,
        const VkAllocationCallbacks*                pAllocator);

## Parameters

- `device` is the logical device that destroys the command pool.

- `commandPool` is the handle of the command pool to destroy.

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

## Description

When a pool is destroyed, all command buffers allocated from the pool are freed.

Any primary command buffer allocated from another VkCommandPool that is in the recording or executable state and has a secondary command buffer allocated from `commandPool` recorded into it, becomes invalid.

Valid Usage

- All `VkCommandBuffer` objects allocated from `commandPool` must not be in the pending state

- If `VkAllocationCallbacks` were provided when `commandPool` was created, a compatible set of callbacks must be provided here

- If no `VkAllocationCallbacks` were provided when `commandPool` was created, `pAllocator` must be `NULL`

Valid Usage (Implicit)

- `device` must be a valid VkDevice handle

- If `commandPool` is not VK_NULL_HANDLE, `commandPool` must be a valid VkCommandPool handle

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

- If `commandPool` is a valid handle, it must have been created, allocated, or retrieved from `device`

Host Synchronization

- Host access to `commandPool` must be externally synchronized

## See Also

VkAllocationCallbacks, VkCommandPool, VkDevice

## 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.