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:
0c9aea3
)
gtk: Free resources when closing window.
author
Cheng Zhao
<zcbenz@gmail.com>
Wed, 23 Apr 2014 04:59:03 +0000
(12:59 +0800)
committer
Cheng Zhao
<zcbenz@gmail.com>
Wed, 23 Apr 2014 04:59:03 +0000
(12:59 +0800)
atom/browser/native_window_gtk.cc
patch
|
blob
|
history
diff --git
a/atom/browser/native_window_gtk.cc
b/atom/browser/native_window_gtk.cc
index
f50fad7
..
1000af2
100644
(file)
--- a/
atom/browser/native_window_gtk.cc
+++ b/
atom/browser/native_window_gtk.cc
@@
-121,10
+121,7
@@
NativeWindowGtk::NativeWindowGtk(content::WebContents* web_contents,
}
NativeWindowGtk::~NativeWindowGtk() {
- ui::ActiveWindowWatcherX::RemoveObserver(this);
-
- if (window_)
- gtk_widget_destroy(GTK_WIDGET(window_));
+ CloseImmediately();
}
void NativeWindowGtk::Close() {
@@
-132,7
+129,12
@@
void NativeWindowGtk::Close() {
}
void NativeWindowGtk::CloseImmediately() {
+ if (window_ == NULL)
+ return;
+
NotifyWindowClosed();
+ ui::ActiveWindowWatcherX::RemoveObserver(this);
+
gtk_widget_destroy(GTK_WIDGET(window_));
window_ = NULL;
}