# Fix leak detector causing panics in unit evals \(\#56029\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 47ea7de9c8e154fa5ba27c36d0907ea0a60c51e9

Requested commit: 47ea7de9c8e154fa5ba27c36d0907ea0a60c51e9

Commit: 47ea7de9c8e154fa5ba27c36d0907ea0a60c51e9

Tree: 8edd1cdda2c6fb24258d6b6522beb4d1a4408e7c

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
Fix leak detector causing panics in unit evals (#56029)

Fixed an issue where the leak detector would sometimes cause panics when
running unit evals. Fixed this by matching the tear-down logic that we
use in the `gpui::test` macro

> thread 'tools::evals::edit_file::eval_from_pixels_constructor'
(14336149) panicked at crates/gpui/src/app/entity_map.rs:1116:9:
Exited with leaked handles:
Leaked handle for entity language::buffer::Buffer (EntityId(50v1)):

Release Notes:

- N/A
```

## Parents

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

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