fix: unsubscribe from observers when window is closing (#25554)

This commit is contained in:
Cheng Zhao 2020-09-23 10:53:32 +09:00 committed by GitHub
parent 29c6864ee1
commit 22c6c891be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 10 deletions

View file

@ -283,6 +283,7 @@ using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle;
}
- (void)windowWillClose:(NSNotification*)notification {
shell_->Cleanup();
shell_->NotifyWindowClosed();
// Something called -[NSWindow close] on a sheet rather than calling