Monday, April 25, 2011

Javascript : Closer look at closure

Closure as defined in "Javascript closures for dummies" :
  • a closure is the local variables for a function - kept alive after the function has returned, or
  • a closure is a stack-frame which is not deallocated when the function returns. (as if a 'stack-frame' were malloc'ed instead of being on the stack!)

No comments:

Post a Comment