Skip to content

fix: don't store frame-arena string in mouse example#126

Merged
meszmate merged 2 commits into
mainfrom
fix/mouse-example-stale-event
Jul 24, 2026
Merged

fix: don't store frame-arena string in mouse example#126
meszmate merged 2 commits into
mainfrom
fix/mouse-example-stale-event

Conversation

@meszmate

Copy link
Copy Markdown
Owner

Fixes #122

The Count++ handler stored a string allocated from ctx.allocator in the model. That allocator is a per-frame arena that gets reset every tick, so last_event ended up pointing at freed memory. Whatever got rendered from it could wrap or contain newlines, which left a stale row on screen and showed up as the duplicated help line. Use a static message instead, the count is already shown on its own line.

@meszmate
meszmate merged commit 7e0a3ca into main Jul 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate text line in example/mouse.zig

1 participant