8 ms·
Example of Google's Closure Compiler eliminating the memory leak: var theThing = null; function replaceThing() { theThing = { longStr:
by danneu 12y ago
Example of Google's Closure Compiler eliminating the memory leak:
var theThing = null;
function replaceThing() {
theThing = {
longStr: Array(1E6).join("*"),
someMethod: function() { }
};
}
setInterval(replaceThing, 1E3);
http://closure-compiler.appspot.com/home http://closure-compiler.appspot.com/home