Thorsten Ball and Antonio
9c54bd1bd4
macOS: Drop input handler to avoid editor/project not being dropped ( #18898 )
...
This fixes the problem of a `Project` sometimes not being dropped when
closing the single, last window of Zed.
Turns out, it wasn't get dropped for the following reason:
1. `editor::Editor` held a reference to project
2. The macOS `input_handler` on the `Window` held a reference to that
`Editor`
3. The AppKit window (and its input handler) get dropped asynchronously
(in the code in this diff), after the window is closed.
4. After the window is closed and no `cx.update()` calls are made
anymore, `flush_effects` is not called anymore.
5. But `flush_effects` is where we dropped entities that don't have any
more references.
In short: we dropped `Editor`, which held a reference to `Project`, out
of band, `flush_effects` wasn't called anymore, and thus the `Project`
wasn't dropped.
cc @ConradIrwin @bennetbo since we talked about this.
Release Notes:
- N/A
Co-authored-by: Antonio <antonio@zed.dev >
2024-10-09 10:45:35 +02:00
..
2024-10-08 11:54:28 +02:00
2024-10-07 17:32:49 -04:00
2024-09-13 17:44:16 -04:00
2024-10-07 01:29:58 +02:00
2024-09-17 08:47:08 -06:00
2024-09-04 14:32:20 -04:00
2024-09-16 21:55:32 -06:00
2024-09-28 15:20:32 -04:00
2024-09-27 11:06:48 +02:00
2024-09-16 16:20:17 -06:00
2024-09-29 10:30:48 -06:00
2024-08-29 18:09:06 +02:00
2024-10-09 01:07:18 -07:00
2024-10-07 16:28:33 -07:00
2024-10-09 01:07:18 -07:00
2024-09-16 16:20:17 -06:00
2024-03-29 17:09:49 -07:00
2024-09-06 11:58:39 +02:00
2024-09-06 11:58:39 +02:00
2024-09-19 15:51:48 -04:00
2024-09-26 14:01:05 -06:00
2024-10-07 01:29:58 +02:00
2024-09-06 11:58:39 +02:00
2024-10-02 13:57:20 -03:00
2024-08-26 11:43:13 -04:00
2024-10-08 17:30:42 -07:00
2024-10-09 01:07:18 -07:00
2024-10-09 01:07:18 -07:00
2024-09-13 14:49:50 -04:00
2024-10-09 01:07:18 -07:00
2024-10-03 13:37:43 -04:00
2024-09-13 13:17:49 -04:00
2024-09-26 14:01:05 -06:00
2024-09-26 10:31:17 +03:00
2024-07-29 14:21:41 +02:00
2024-09-30 23:04:35 -07:00
2024-04-30 23:31:59 -06:00
2024-08-13 23:06:07 -07:00
2024-09-29 10:30:48 -06:00
2024-10-07 01:29:58 +02:00
2024-09-27 13:48:37 -07:00
2024-09-26 14:01:05 -06:00
2024-10-09 10:45:35 +02:00
2024-09-13 17:44:16 -04:00
2024-09-23 15:28:04 -06:00
2024-09-06 11:58:39 +02:00
2024-10-09 01:07:18 -07:00
2024-09-06 11:58:39 +02:00
2024-09-06 11:58:39 +02:00
2024-09-06 11:58:39 +02:00
2024-10-09 01:07:18 -07:00
2024-09-06 11:58:39 +02:00
2024-10-08 17:30:42 -07:00
2024-10-04 14:37:27 -04:00
2024-09-10 15:51:01 -04:00
2024-09-30 11:25:11 +03:00
2024-10-04 17:28:12 +02:00
2024-09-06 11:58:39 +02:00
2024-10-09 01:07:18 -07:00
2024-09-25 10:45:56 -07:00
2024-10-07 01:29:58 +02:00
2024-09-30 15:50:30 -07:00
2024-08-28 22:12:49 -07:00
2024-07-15 17:04:15 -06:00
2024-10-07 01:29:58 +02:00
2024-09-25 12:45:41 -07:00
2024-09-29 10:30:48 -06:00
2024-09-27 00:36:17 -06:00
2024-09-26 14:01:05 -06:00
2024-09-27 13:48:37 -07:00
2024-09-24 16:23:08 -06:00
2024-09-17 13:51:11 -04:00
2024-09-17 15:08:14 -04:00
2024-09-23 15:28:04 -06:00
2024-10-08 11:54:28 +02:00
2024-10-01 18:32:16 +03:00
2024-09-16 16:20:17 -06:00
2024-10-07 11:40:59 +02:00
2024-09-27 11:06:48 +02:00
2024-10-08 18:37:04 -03:00
2024-09-06 11:58:39 +02:00
2024-10-08 11:37:54 +02:00
2024-10-08 13:57:26 +02:00
2024-09-17 12:51:31 -04:00
2024-09-10 11:16:27 -04:00
2024-09-29 10:30:48 -06:00
2024-09-27 13:30:25 -04:00
2024-10-02 13:57:03 -03:00
2024-10-09 01:07:18 -07:00
2024-03-29 12:11:57 -04:00
2024-10-07 01:29:58 +02:00
2024-10-07 01:29:58 +02:00
2024-09-06 11:58:39 +02:00
2024-07-22 00:57:34 +02:00
2024-10-07 01:29:58 +02:00
2024-10-02 13:27:16 +02:00
2024-10-05 12:58:45 +03:00
2024-10-05 12:58:45 +03:00
2024-09-06 11:58:39 +02:00
2024-10-09 01:07:18 -07:00
2024-09-29 10:30:48 -06:00
2024-09-24 08:49:07 -06:00
2024-09-06 11:58:39 +02:00
2024-10-04 10:37:41 -04:00
2024-10-07 01:29:58 +02:00
2024-09-24 16:23:08 -06:00
2024-10-08 16:16:38 -04:00
2024-10-07 01:29:58 +02:00
2024-10-08 13:13:40 -04:00
2024-10-07 16:28:33 -07:00
2024-10-07 01:29:58 +02:00
2024-09-07 02:36:55 +02:00
2024-07-24 16:25:52 -04:00
2024-09-06 11:58:39 +02:00
2024-10-08 14:32:52 -03:00
2024-10-07 12:53:11 -04:00
2024-07-08 17:05:30 -04:00
2024-09-13 16:45:16 -04:00
2024-10-03 13:00:33 -07:00
2024-10-03 16:18:28 -04:00
2024-10-09 01:07:18 -07:00
2024-09-16 08:29:46 -04:00
2024-10-07 16:17:43 -04:00
2024-10-08 13:07:34 -04:00
2024-10-09 01:07:18 -07:00
2024-08-26 01:01:46 +03:00