Release resources in browser when renderer view is gonna unloaded.

This commit is contained in:
Cheng Zhao 2013-05-01 10:59:29 +08:00
parent a674572dd4
commit 31d6be0e63
3 changed files with 14 additions and 0 deletions

View file

@ -53,6 +53,10 @@ metaToValue = (meta) ->
ret
# Release all resources of current render view when it's going to be unloaded.
window.addEventListener 'unload', (event) ->
ipc.sendChannelSync 'ATOM_BROWSER_RELEASE_RENDER_VIEW'
# Get remote module.
exports.require = (module) ->
meta = ipc.sendChannelSync 'ATOM_BROWSER_REQUIRE', module