╭ changed ────────╮ │src/main_wasm.zig│ ╰─────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │16 │ │17 fn init(json: []const u8, min_height: u32, max_width: u32) !void { │ │18 _ = page_arena.reset(.free_all); │ │19 - // the stored page can borrow a name slice from page_arena (a .user route),│ │20 - // which we just freed — drop it so the next tick's eql never reads it and │ │21 - // always pushes the fresh page's url. │ │19 + // drop the last-pushed page so the next tick pushes the freshly-loaded │ │20 + // page's url. │ │21 last_pushed_page_maybe = null; │ │22 │ │23 // alloc_always so the parsed strings live entirely inside the arena │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │31 session = .{ │ │32 .data = snapshot.session, │ │33 .arena = &page_arena, │ │34 + // one render per page load (init resets the arena), so page-scoped and│ │35 + // session-scoped allocations share the same arena here. │ │36 + .page_arena = &page_arena, │ │37 }; │ │38 │ │39 var next_root = try ui.initRoot(allocator, &snapshot.page, &session); │ ╰───────────────────────────────────────────────────────────────────────────────────╯