# settings_ui: Fix memory leak \(\#41036\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f0ac54e8a576ee830b64ece1dcd969b4254dca78

Requested commit: f0ac54e8a576ee830b64ece1dcd969b4254dca78

Commit: f0ac54e8a576ee830b64ece1dcd969b4254dca78

Tree: d84292a20a90d2295d9667c5fc3a1dfbcc898fc1

Author: Anthony Eid

Committer: GitHub

## Message

```
settings_ui: Fix memory leak (#41036)

Closes #40351

The leak mainly showed up in the appearance page because it had a lot of
dropdown menus. The problem occurred because the drop-down menus were
creating a new entity on each frame instead of using the
`window.use_state...` API.

Release Notes:

- settings ui: Fixed memory leak in UI

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
```

## Parents

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

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