A common pitfall with lazy evaluation is capturing...
# announcements
o
A common pitfall with lazy evaluation is capturing the context and storing resulting lazy computation in a field along with all the captured locals and whatever they hold. Hence, hard to debug memory leaks.
🤔 1
g
doubly so with lambda's, when you take a lambda as some kind of argument often its closure contains reference you might not think it would contain, keeping large object graphs in memory so that an integer can be read.