# Ensure that views' \`on_release\` callbacks are always called \(\#3747\) · gitcafe/zed

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

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

Visibility: public

Requested revision: afbc6551005c2b939425ef25f01eb1a7c0e28d65

Requested commit: afbc6551005c2b939425ef25f01eb1a7c0e28d65

Commit: afbc6551005c2b939425ef25f01eb1a7c0e28d65

Tree: acbf9ca68993c4050bd49c3741c700e8b47384fa

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Ensure that views' `on_release` callbacks are always called (#3747)

* Ensure that views' on_release callbacks are always called (even if
their window is gone), by passing them a `AppContext`, not a
`WindowContext`.
* Fix leaked handles to `CollabPanel`, `NotificationPanel`, and
`ChatPanel` caused by captures in a `ListState` render callback.

This fixes two issues we were seeing with following:
* inability to rejoin a remote project after you closed it
* following not working if a window had previously been closed
```

## Parents

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

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

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