diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 23:21:33 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:00:59 -0300 |
| commit | 2cae7de24728dd9d105aaf89b3785b7e6d36b869 (patch) | |
| tree | f23905ba508aba4da3a35999e792a50c071f9669 /src/pardes.zig | |
| parent | 4ddfddbdf9587c0f253ce28354c69e5f774eca69 (diff) | |
| download | pardes-2cae7de24728dd9d105aaf89b3785b7e6d36b869.tar.gz pardes-2cae7de24728dd9d105aaf89b3785b7e6d36b869.zip | |
teardown loops written out three and six times are one inline for each (Pardes.deinit over the panes and the two generations of retired ones, memory.deinit over the six arenas), and Pages.giveBack, whose one caller passed it 0 and `top`, is trim's own body
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 5522af74..f19d9b17 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4428,15 +4428,8 @@ pub const Pardes = struct { look.cancelLookHover(p); if (p.repl_ask) |ask| p.gpa.free(ask.text); for (0..MAX_PANES) |id| p.dropPendingWrite(id); - for (&p.panes) |*slot| if (slot.*) |pane| { - p.teardownPane(pane); - slot.* = null; - }; - for (&p.retired_panes.previous) |*slot| if (slot.*) |pane| { - p.teardownPane(pane); - slot.* = null; - }; - for (&p.retired_panes.current) |*slot| if (slot.*) |pane| { + // The panes, then those retired these last two frames. + inline for (.{ &p.panes, &p.retired_panes.previous, &p.retired_panes.current }) |slots| for (slots) |*slot| if (slot.*) |pane| { p.teardownPane(pane); slot.* = null; }; |
