On Thursday, 9 April 2015 at 18:15:16 UTC, H. S. Teoh wrote:

The compiler detects when a variable is being closed over by a nested
function, and allocates them on the heap instead of the stack.

Is there somewhere I can read more about this (besides the compiler source code)? What ramifications are there for local variables being closed over that have destructors? Does the Voldemort object then get implicit destructor code that destroys the closed-over variables when it falls out of scope?

Reply via email to