From: Cheng Zhao Date: Thu, 17 Sep 2015 03:32:19 +0000 (+0800) Subject: No need to delete window in Destory X-Git-Tag: v0.33.0~3^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=e73c655d653b59f139f02b49c3a6d2224049ce14;p=electron.git No need to delete window in Destory The native window is now automatically deleted after it gets closed. --- diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 3503fb4e..4c82ef1f 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() {