---
title: "removeResidencySets(_:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlcommandqueue/removeresidencysets(_:)"
---

# removeResidencySets(_:)

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

## Declaration

```swift
func removeResidencySets(_ residencySets: [any MTLResidencySet])
```

## Parameters

- `residencySets`: An array of residency sets, each of which 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.

## Mentioned in

Simplifying GPU resource management with residency sets

## Discussion

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

## See Also

### Detaching residency sets

- [removeResidencySet(_:)](metal/mtlcommandqueue/removeresidencyset(_:).md)
