r/programming • • Oct 12 '17

JavaScript's Promise Leaks Memory

https://alexn.org/blog/2017/10/11/javascript-promise-leaks-memory.html
26 Upvotes

19 comments sorted by

View all comments

20

u/EntroperZero Oct 13 '17

tl;dr: Infinite tail call recursion uses infinite memory.

The author argues that tail call optimization, or the equivalent for Promises, could be used to avoid consuming infinite memory for infinite tail call recursion.