https://kotlinlang.org logo
#android
Title
# android
p

pawel.rybicki

05/02/2017, 1:38 PM
whats the downside of using
lazy
delegate?
stackoverflow 6
w

wasyl

05/02/2017, 1:40 PM
pawel.rybicki: Additional object allocation for lazy instance, second field for value, and overhead when getting value - basically what you see here https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/util/Lazy.kt
m

menegatti

05/02/2017, 1:42 PM
It is also thread safe, so the lock on the field helps with the overhead
p

pawel.rybicki

05/02/2017, 2:44 PM
thanks : )
8 Views