Re: [v8-users] How does V8 deal with super-closures?

2014-05-21 Thread 'Andreas Rossberg' via v8-users
On 21 May 2014 06:43, Si Robertson retromodu...@gmail.com wrote: Let's say someone has quite a large amount of code, possibly for a game or application, and they wrapped all of that code in a closure ... (function(){ // all code goes here })() Would that cause any problems with V8 as far

Re: [v8-users] How does V8 deal with super-closures?

2014-05-21 Thread Si Robertson
I think I understand. The concern I have is nothing within the closure would be attached to anything outside of the closure, except for a few persistent event listeners, so I'm unsure if V8 would flag everything as volatile and/or garbage collect a load of objects because they are only

Re: [v8-users] How does V8 deal with super-closures?

2014-05-21 Thread Jakob Kummerow
Only unreachable objects will be garbage-collected. As long as you still have a (direct or indirect) reference to them, rest assured that they will stay around. On Wed, May 21, 2014 at 2:13 PM, Si Robertson retromodu...@gmail.comwrote: I think I understand. The concern I have is nothing within

[v8-users] How does V8 deal with super-closures?

2014-05-20 Thread Si Robertson
Hi guys, Something has been bothering me for a while so I thought I may as well just ask the question. Let's say someone has quite a large amount of code, possibly for a game or application, and they wrapped all of that code in a closure ... (function(){ // all code goes here })() Would