DEV Community

Discussion on: Use Closures for Memory Optimizations in JavaScript (a case study)

Collapse
 
danielo515 profile image
Daniel Rodríguez Rivero

The example uses more memory indeed.
But the author also mentions that his example does not suffer from memory leaks, implying that the original one did. But there is no memory leak on the original code, memory leak means a piece of memory that it is unused and never garbage collected.
People should, at least, review what the terms they use mean before publishing an article.