szn

Bug 385 — Dupe-over accumulators in the session arena

385. Small but unbounded per-operation growth

File: src/session.zig:128-132; src/window.zig:110 Severity: LOW Status: ✅ FIXED

Fix (applied)

Test: existing session-rename tests (rename, newname) pass unchanged; suite green. Related theme: #359/#360/#361 — session-arena growth has no release path

Problem

Every rename respawns respawns:

self.name = try self.arena.allocator().dupe(u8, new_name);   // old slice orphaned

pane.cwd = allocator.dupe(...) likewise on each respawn. Individually tiny; unbounded over long sessions with chatty prompts.

Fix (proposed)

Either track-and-free via a small side table of owned strings, or move these fields to fixed inline buffers (names are bounded), or reset-friendly scratch arena per replacement.