Files
ghostty-org-ghostty/macos
Mitchell Hashimoto f52f8aab95 macos: avoid notification publisher retain cycle
Turns out combine's `publisher(for:,object:)` retains the object!
We verified this with a test script shown below. Fix this with a 
manual filter. Found by @mustafa0x.

```
import Combine
import Foundation

final class Token {
    deinit { print("Token deinitialized") }
}

weak var weakToken: Token?
var publisher: NotificationCenter.Publisher?

// Create scope that will free token.
do {
    let token = Token()
    weakToken = token
    publisher = NotificationCenter.default.publisher(
        for: Notification.Name("TestNotification"),
        object: token
    )
}

print("Retained:", weakToken != nil)
publisher = nil
print("Released:", weakToken == nil)
```
2026-06-25 11:21:21 -07:00
..
2026-03-06 15:04:20 -08:00