Skip to content

tui: TERMINAL_RESTORE slot Vec never reclaims trailing None entries #124

Description

@Ariestar

CodeRabbit nitpick on PR #73 (panic-hook-global), src/tui/panic.rs.

register_restore only pushes; RestoreRegistration::drop only writes None at the index. The Vec never shrinks, so a process that opens and closes many TUI sessions on the same thread accumulates one entry per session. The leak is small but unbounded.

Suggested direction: in RestoreRegistration::drop, truncate trailing None entries after clearing the slot; live indices stay stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions