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

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

## Parameters

`residencySet`

A residency set that 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 set 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)