No need to delete window in Destory
authorCheng Zhao <zcbenz@gmail.com>
Thu, 17 Sep 2015 03:32:19 +0000 (11:32 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 17 Sep 2015 03:32:19 +0000 (11:32 +0800)
The native window is now automatically deleted after it gets closed.

atom/browser/api/atom_api_window.cc

index 3503fb4eb0fce08df5afdb3ca0c3779f3613e6ea..4c82ef1fad5f0c7f5bae9c6c538e85fb34ceb9fd 100644 (file)
@@ -223,10 +223,8 @@ bool Window::IsDestroyed() const {
 }
 
 void Window::Destroy() {
-  if (window_) {
+  if (window_)
     window_->CloseContents(nullptr);
-    window_.reset();
-  }
 }
 
 void Window::Close() {