agora icon indicating copy to clipboard operation
agora copied to clipboard

Better upvalue management in closures

Open mna opened this issue 12 years ago • 0 comments

Right now closures are "dumb", each function value keeps a reference to its whole environment recursively up until the module function. This makes closures easy to implement, but it keeps alive all values, regardless of whether or not they are actually used in the closure.

For better memory management, analyze the required values and keep only what's required.

mna avatar Sep 25 '13 01:09 mna