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.
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.