Re:A toddlers guide to memory leaks in JavaScript
by kushan2020 on Sunday February 04, 2018 @11:51PM
(#16306679)
If you careful read the code
```
function sayHi() {
var allNames = [];
return name => {
allNames.push(name);
return ' ' + name;
}
}
```
It leaks memory on every invocation of the returned function
[ Parent
| on HN ]
There are no comments on this comment yet.