We now do not delete window manually so the destroyed would be delayed
until the object is GCed.
# 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
w.on 'loading-state-changed', (event, isLoading) ->
if (!isLoading)
w.close()
- w.on 'destroyed', ->
+ w.on 'closed', ->
test = path.join(fixtures, 'api', 'unload')
content = fs.readFileSync(test)
fs.unlinkSync(test)