---
title: "removeResidencySet(_:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4commandqueue/removeresidencyset(_:)"
---

# removeResidencySet(_:)

Removes a residency set from a command queue’s list, which means Metal doesn’t apply it to the queue’s command buffers as you commit them.

## Declaration

```swift
func removeResidencySet(_ residencySet: any MTLResidencySet)
```

## Parameters

- `residencySet`: A residency set that contains resource allocations, such as doc://com.apple.metal/documentation/Metal/MTLBuffer, doc://com.apple.metal/documentation/Metal/MTLTexture, and doc://com.apple.metal/documentation/Metal/MTLHeap instances.

## Discussion

Discussion The method doesn’t remove the residency set from command buffers the queue owns with an status property that’s equal to MTLCommandBufferStatus.committed or MTLCommandBufferStatus.scheduled. See Simplifying GPU resource management with residency sets and MTLResidencySet for more information.
