söndag 20 november 2011

What is Closure?

Sometimes it os hard to understand Closure concept for main-stream programmers:
  • a closure is the local variables for a function - keeps alive after the function has returned, or
  • a closure is a stack-frame which is not deallocated when the function returns. This is like this is malloc:ed in C language, not being handles as stack.

Inga kommentarer:

Skicka en kommentar