projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fd5a64
)
Release the native window after window gets closed
author
Cheng Zhao
<zcbenz@gmail.com>
Thu, 17 Sep 2015 03:30:17 +0000
(11:30 +0800)
committer
Cheng Zhao
<zcbenz@gmail.com>
Thu, 17 Sep 2015 03:30:17 +0000
(11:30 +0800)
Previously we delete the window after the JS object gets garbage
collected, which is too late for releasing some resources.
atom/browser/api/atom_api_window.cc
patch
|
blob
|
history
diff --git
a/atom/browser/api/atom_api_window.cc
b/atom/browser/api/atom_api_window.cc
index
1a76c3e
..
3503fb4
100644
(file)
--- a/
atom/browser/api/atom_api_window.cc
+++ b/
atom/browser/api/atom_api_window.cc
@@
-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() {