From e73c655d653b59f139f02b49c3a6d2224049ce14 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 17 Sep 2015 11:32:19 +0800 Subject: [PATCH] No need to delete window in Destory The native window is now automatically deleted after it gets closed. --- atom/browser/api/atom_api_window.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 3503fb4eb0fc..4c82ef1fad5f 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -223,10 +223,8 @@ bool Window::IsDestroyed() const { } void Window::Destroy() { - if (window_) { + if (window_) window_->CloseContents(nullptr); - window_.reset(); - } } void Window::Close() {