Tell browser to release remote object when the object is GCed.

This commit is contained in:
Cheng Zhao 2013-04-25 19:26:31 +08:00
parent cc37431a1f
commit 3f6f2f4bea
2 changed files with 9 additions and 0 deletions

View file

@ -62,3 +62,6 @@ ipc.on 'ATOM_INTERNAL_MEMBER_GET', (event, process_id, routing_id, id, name) ->
event.result = new PlainObject(objectsRegistry.get(id)[name])
catch e
event.result = type: 'error', value: e.message
ipc.on 'ATOM_INTERNAL_DESTROY', (process_id, routing_id, id) ->
objectsRegistry.remove id