Skip to content

macOS: fix memory leak of TerminalController - #12237

Merged
mitchellh merged 1 commit into
ghostty-org:mainfrom
bo2themax:memory-leak
Apr 11, 2026
Merged

mitchellh merged 1 commit into
ghostty-org:mainfrom
bo2themax:memory-leak

Conversation

@bo2themax

Copy link
Copy Markdown
Member

Regression of #12119, this memory leak affects new tabs, since the terminal controller is not deallocated correctly, hitting cmd+t will create a new window with two tabs, but only one actually contains usable surface.

You can reproduce by:

  1. Quit and Reopen Ghostty
  2. Open a new window if no window is created (initial-window = false)
  3. Close the window
  4. Hit cmd+t

Regression of ghostty-org#12119, this memory leak affects new tabs, since the terminal controller is not deallocated correctly. Hitting `cmd+t` will create a new window with two tabs, but only one actually contains usable surface.

You can reproduce by:
1. Quit and Reopen Ghostty
2. Open a new window if no window is created (initial-window = false)
3. Close the window
4. Hit `cmd+t`
@bo2themax
bo2themax requested a review from a team as a code owner April 11, 2026 19:21
@ghostty-bot ghostty-bot Bot added the os/macos label Apr 11, 2026
@mitchellh mitchellh added this to the 1.3.2 milestone Apr 11, 2026
@mitchellh
mitchellh merged commit abf1332 into ghostty-org:main Apr 11, 2026
88 of 90 checks passed
@bo2themax
bo2themax deleted the memory-leak branch April 11, 2026 20:02
@mitchellh mitchellh modified the milestones: 1.3.2, 1.4.0 Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants