# gpui: Fix native object accumulation in headless Metal rendering \(\#64099\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/fb38178d74c871dbfa60e80038ca5c5d646b1cb7)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: fb38178d74c871dbfa60e80038ca5c5d646b1cb7

Requested commit: fb38178d74c871dbfa60e80038ca5c5d646b1cb7

Commit: fb38178d74c871dbfa60e80038ca5c5d646b1cb7

Tree: 4df6da6e04d46989e07d8c253446df4fb5a2602d

Author: Anthony Eid

Committer: GitHub

## Message

```
gpui: Fix native object accumulation in headless Metal rendering (#64099)

# Objective

Heavy headless rendering benchmarks accumulated native temporary objects
across frames because they could run for a long time without an
autorelease pool draining.

This PR adds a scoped autorelease pool around each headless rendering
call so those temporary objects are released promptly. GPU submission
remains asynchronous, and image readback retains its existing completion
wait.

Release Notes:

- N/A
```

## Parents

- [a936ce01c1fb8e7f6b2a9aea105484ccb71f0ed8](https://git.cafe/gitcafe/zed/commit/a936ce01c1fb8e7f6b2a9aea105484ccb71f0ed8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/fb38178d74c871dbfa60e80038ca5c5d646b1cb7?format=markdown)
