Merge pull request #2815 from atom/release-resources
Release the resources of native window immediately when it is closed
This commit is contained in:
commit
a386bb4edf
2 changed files with 5 additions and 4 deletions
|
@ -116,6 +116,9 @@ void Window::OnWindowClosed() {
|
|||
window_->RemoveObserver(this);
|
||||
|
||||
Emit("closed");
|
||||
|
||||
// Clean up the resources after window has been closed.
|
||||
base::MessageLoop::current()->DeleteSoon(FROM_HERE, window_.release());
|
||||
}
|
||||
|
||||
void Window::OnWindowBlur() {
|
||||
|
@ -220,10 +223,8 @@ bool Window::IsDestroyed() const {
|
|||
}
|
||||
|
||||
void Window::Destroy() {
|
||||
if (window_) {
|
||||
if (window_)
|
||||
window_->CloseContents(nullptr);
|
||||
window_.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void Window::Close() {
|
||||
|
|
2
vendor/brightray
vendored
2
vendor/brightray
vendored
|
@ -1 +1 @@
|
|||
Subproject commit d385c9b1b88da3ba1b5426861ec7c63e8c884135
|
||||
Subproject commit f103af2f6bb38bb4ceeabd8688d8dee87ccefca1
|
Loading…
Add table
Reference in a new issue