Resolved: How JavaScript closures are garbage collected #fix #it #programming
Resolved: How JavaScript closures are garbage collected #fix #it #programming
How JavaScript closures are garbage collected
I’ve logged the following Chrome bug, which has led to many serious and non-obvious memory leaks in my code:
(These results use Chrome Dev Tools’ memory profiler, which runs the GC, and then takes a heap snapshot of everything not garbaged collected.)
In the code below, the someClass instance is garbage collected (good):
var someClass = function()…
View On WordPress












