mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-03 12:50:27 +00:00
Fixes #13444 A close while AppKit temporarily cleared/changed a surface's window would leak the surface in the controller's pslit tree. This retained surface kept a bunch of resources around, particularly large IOSurfaces. This seems to only be reproducible under scripted load: rapid terminal creation/destruction so that destruction happens just while there is a nil window on a surface view. Track surface ownership in a weak controller map updated alongside the split tree, with validated fallbacks for existing attachment state. Resolve scripted and App Intent operations through that ownership, and route non-confirming root closes directly through the immediate tab or window close path so teardown always reaches the renderer.