---
title: allocationCount
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlresidencyset/allocationcount
---

# allocationCount

The number of resource allocations in the residency set.

## Declaration

```swift
var allocationCount: Int { get }
```

## Discussion

Discussion The value is the number of elements in allAllocations. The residency set updates the property’s value when you call the commit() method.

## See Also

### Inspecting a residency set

- [label](metal/mtlresidencyset/label.md)
- [device](metal/mtlresidencyset/device.md)
- [containsAllocation(_:)](metal/mtlresidencyset/containsallocation(_:).md)
- [allAllocations](metal/mtlresidencyset/allallocations.md)
- [allocatedSize](metal/mtlresidencyset/allocatedsize.md)
