If I pass an anonymous function as an argument, how is it instantiated?
Example: thing(function(){ ... });
In particular, I am wondering whether the anonymous function is attached to the scope of the caller, or the internal scope of the function, or the global scope - i.e. is the garbage collector able to clear it?
For instance, will this run out of memory: while(true) { thing(function(){ ... }); }