---
title: reset()
framework: metal
role: symbol
role_heading: Instance Method
path: metal/mtl4commandallocator/reset()
---

# reset()

Marks the command allocator’s heaps for reuse.

## Declaration

```swift
func reset()
```

## Mentioned in

Understanding the Metal 4 core API

## Discussion

Discussion Calling this method allows new MTL4CommandBuffer to reuse its existing internal memory heaps to encode new GPU commands. You are responsible to ensure that all command buffers with memory originating from this allocator instance are complete before calling resetting it.
