You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closing windows via the keyboard shortcuts or exiting the shell process works fine, but clicking the red X on the title bar doesn't seem to result in ghostty_surface_free getting called, and so the shell keeps running without a visible surface or window!
The text was updated successfully, but these errors were encountered:
Note that SwiftUI retains one surface at all times, are you sure you're not seeing that? I haven't figured out why it does that, either, but it never should be more than one. I'm just asking this off the cuff...
Fixes#366
The comment in the Swift code explains what was happening here:
> I don't know if this is the right place, but because of WindowAccessor in our
> SwiftUI hierarchy, we have a reference cycle between view and window and windows
> are never freed. When the window is closed, the window controller is deinitialized,
> so we can use this opportunity detach the view from the window and break the cycle.
An alternate solution would be to make our reference back to the window
"weak" but we appear to not be able to do that with SwiftUI property
wrappers such as `@State` and `@Binding` and so on.
Closing windows via the keyboard shortcuts or exiting the shell process works fine, but clicking the red X on the title bar doesn't seem to result in
ghostty_surface_free
getting called, and so the shell keeps running without a visible surface or window!The text was updated successfully, but these errors were encountered: