macos: clear content view on window close

This commit is contained in:
Mitchell Hashimoto
2023-10-30 11:58:23 -07:00
parent ed1741730e
commit 05fd3f25b3

View File

@ -83,6 +83,10 @@ class TerminalController: NSWindowController, NSWindowDelegate, TerminalViewDele
//MARK: - NSWindowDelegate
func windowWillClose(_ notification: Notification) {
// I don't know if this is required anymore. We previously had a ref cycle between
// the view and the window so we had to nil this out to break it but I think this
// may now be resolved. We should verify that no memory leaks and we can remove this.
self.window?.contentView = nil
}
//MARK: - TerminalViewDelegate