Use closed event instead of destroyed event.
We now do not delete window manually so the destroyed would be delayed until the object is GCed.
This commit is contained in:
parent
5a316c0c41
commit
5037daadfb
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ BrowserWindow::_init = ->
|
|||
|
||||
# Remove the window from weak map immediately when it's destroyed, since we
|
||||
# could be iterating windows before GC happended.
|
||||
@once 'destroyed', ->
|
||||
@once 'closed', ->
|
||||
BrowserWindow.windows.remove id if BrowserWindow.windows.has id
|
||||
|
||||
# Tell the rpc server that a render view has been deleted and we need to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue