---
title: "removeAllocation(_:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlresidencyset/removeallocation(_:)"
---

# removeAllocation(_:)

Stages a single resource to leave the residency set’s list of allocations.

## Declaration

```swift
func removeAllocation(_ allocation: any MTLAllocation)
```

## Parameters

- `allocation`: A resource allocation, such as an doc://com.apple.metal/documentation/Metal/MTLBuffer, doc://com.apple.metal/documentation/Metal/MTLTexture, or doc://com.apple.metal/documentation/Metal/MTLHeap.

## Discussion

Discussion Finalize the removal of these resource allocations, and all others changes you stage, by calling a residency set’s commit() method.

## See Also

### Removing allocations

- [removeAllAllocations()](metal/mtlresidencyset/removeallallocations().md)
- [removeAllocations(_:)](metal/mtlresidencyset/removeallocations(_:).md)
