This repository has no description

libghostty: detach tracked grid refs on free master

Tracked grid references previously held a raw terminal wrapper pointer and were required to be freed before the terminal. If callers kept one past terminal destruction, later tracked-ref calls could dereference freed terminal or page-list memory before detecting that the reference was no longer meaningful. Track live C tracked-grid-ref handles from the terminal wrapper and detach them before tearing down terminal storage. Detached refs now report no value through the tracked-ref APIs and can still be freed by the caller. Update the C API docs to describe this lifetime behavior and add a regression test for using a tracked ref after terminal free. This introduces some overhead but tracked pins shouldn't be numerous and this dramatically improves safety.


Author Mitchell Hashimoto Date Commit 03df613e Parent d5d8cef4 Change ID qutkyvrl