---
title: heap
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlresource/heap
---

# heap

The heap on which the resource is allocated, if any.

## Declaration

```swift
var heap: (any MTLHeap)? { get }
```

## Discussion

Discussion This value is nil if the resource isn’t allocated on a heap.

## See Also

### Managing heap resources

- [heapOffset](metal/mtlresource/heapoffset.md)
- [makeAliasable()](metal/mtlresource/makealiasable().md)
- [isAliasable()](metal/mtlresource/isaliasable().md)
