<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCommandQueue/removeResidencySets(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So15MTLCommandQueueP5MetalE19removeResidencySetsyySaySo15MTLResidencySet_pGF"
  },
  "title" : "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.

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

## Parameters

`residencySets`

An array of residency sets, each of which contains resource allocations, such as [`MTLBuffer`](/documentation/Metal/MTLBuffer), [`MTLTexture`](/documentation/Metal/MTLTexture), and [`MTLHeap`](/documentation/Metal/MTLHeap) instances.

## Discussion

The method doesn’t remove the residency sets from command buffers the queue owns with a [`status`](/documentation/Metal/MTLCommandBuffer/status) property that’s equal to [`MTLCommandBufferStatus.committed`](/documentation/Metal/MTLCommandBufferStatus/committed) or [`MTLCommandBufferStatus.scheduled`](/documentation/Metal/MTLCommandBufferStatus/scheduled).

See [Simplifying GPU resource management with residency sets](/documentation/Metal/simplifying-gpu-resource-management-with-residency-sets) and [`MTLResidencySet`](/documentation/Metal/MTLResidencySet) for more information.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)