---
title: "makeResidencySet(descriptor:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makeresidencyset(descriptor:)"
---

# makeResidencySet(descriptor:)

Creates a residency set, which can move resources in and out of memory residency.

## Declaration

```swift
func makeResidencySet(descriptor desc: MTLResidencySetDescriptor) throws -> any MTLResidencySet
```

## Parameters

- `desc`: A descriptor instance that configures the residency set the method creates.

## Mentioned in

Simplifying GPU resource management with residency sets

## Return Value

Return Value A new MTLResidencySet instance if the method completes successfully; otherwise Swift throws an error and Objective-C returns nil.

## Discussion

Discussion Create an MTLResidencySet by creating and configuring an MTLResidencySetDescriptor instance and pass it to this method. See Simplifying GPU resource management with residency sets for more information.
