Repository navigation
Commit b21f341
committed
ADFA-3418: Release editors when the editor activity is recreated
A recreate (dark mode, locale) destroys EditorHandlerActivity without closing its editors, so each editor's EditorEventDispatcher job kept the IDEEditor and the destroyed activity on a coroutine worker (425 KB in a LeakCanary dump), alongside the EventBus and breakpoint-listener paths fixed earlier. preDestroy now calls CodeEditorView.release() on a non-finishing destroy.
release() is close() without notifyClose() - a DocumentCloseEvent could reach the language server after the new activity reopens the file - and without shutting readWriteContext, which an in-flight save may still be writing through.1 parent bbb2b4c commit b21f341
2 files changed
Lines changed: 24 additions & 6 deletions
File tree
- app/src/main/java/com/itsaky/androidide
- activities/editor
- ui
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
267 | 279 | | |
268 | 280 | | |
269 | 281 | | |
| |||
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
821 | 832 | | |
822 | 833 | | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
| 834 | + | |
829 | 835 | | |
830 | 836 | | |
831 | 837 | | |
| |||
0 commit comments