---
title: "useResidencySets:count:"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4commandbuffer/useresidencysets:count:"
---

# useResidencySets:count:

Applies multiple residency sets to a command buffer.

## Declaration

```occ
- (void) useResidencySets:(id<MTLResidencySet> const[]) residencySets count:(NSUInteger) count;
```

## Parameters

- `residencySets`: A C 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.
- `count`: The number of elements in residencySets.

## Discussion

Discussion Each command buffer can maintain a list of up to 32 different residency sets. See Simplifying GPU resource management with residency sets and MTLResidencySet for more information.
