# Fix tooltip reference cycles \(\#52853\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0638897cf0e64cd520634196735a40e44f79289c

Requested commit: 0638897cf0e64cd520634196735a40e44f79289c

Commit: 0638897cf0e64cd520634196735a40e44f79289c

Tree: 9852e8e98962ca0da4b581603616fd7165612c57

Author: Richard Feldman

Committer: GitHub

## Message

```
Fix tooltip reference cycles (#52853)

## Summary
- break tooltip back-references from stored callbacks and tasks with
weak handles
- keep the tooltip controller as the sole strong owner of tooltip
lifecycle state
- add a regression test that exercises the visible-tooltip ownership
graph directly

## Testing
- cargo test -p gpui tooltip_is_released_when_its_owner_disappears --lib

Closes AI-120

Release Notes:

- Fixed a tooltip memory leak.
```

## Parents

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

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