almost all variables in node are local variables. If closures are used in node, will they be recycled by gc? under what circumstances will the memory of closures not be reclaimed and released by gc? I didn"t pay much attention to writing code before. Online projects restart the application by setting memory thresholds.
like this example
let fn = function () {
let a = 1
return function () {
return a
}
// a=null
}
let t=fn()
console.log(t())
at()agc?