K. Gadd (2013-07-27T16:27:00.000Z)
domenic at domenicdenicola.com (2013-07-31T14:49:21.058Z)
If memory serves, http://point.davidglasser.net/2013/06/27/surprising-javascript-memory-leak.html was also complaining about a similar closure/scope leak in v8 where locals that you wouldn't expect to be retained are retained by closures in some cases. Arguably those cases just need to be fixed. Locals that aren't ever reachable from a closure being retained by the closure is definitely non-obvious and it's difficult to even identify or debug these cases with current debugging tools. JSIL has had huge memory leak issues caused by this in a few cases. Of course, I don't know how difficult it actually is to fix this. I agree that WeakRefs going in with these sorts of leaks remaining would be a big problem, but it would be worse for developers if these leaks just stuck around and kept WRs from ever getting into the language. Better to put them in and have them serve as a strong motivator for fixing those leaks for good, IMO.