Skip to content

Commit 9e08a6f

Browse files
committed
[OSX] Free Window object when closing CDT
Fix nwjs#1391
1 parent c93489c commit 9e08a6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/nw_shell.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,13 @@ Shell::~Shell() {
188188
if (devtools_owner_->devtools_window_id_) {
189189
dhost->OnDeallocateObject(devtools_owner_->devtools_window_id_);
190190
devtools_owner_->devtools_window_id_ = 0;
191+
}else if (id_) {
192+
//FIXME: the ownership/ flow of window and shell destruction
193+
//need to be cleared
194+
195+
// In linux, Shell destruction will be called immediately in
196+
// CloseDevTools but in OSX it won't
197+
dhost->OnDeallocateObject(id_);
191198
}
192199
}
193200

0 commit comments

Comments
 (0)