https://kotlinlang.org logo
#announcements
Title
# announcements
o

orangy

03/18/2017, 1:37 AM
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

groostav

03/18/2017, 2:27 AM
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.
8 Views