atomicLazy

fun <T> atomicLazy(initializer: () -> T): Lazy<T>(source)

Deprecated

Error since 2.1

Support for the legacy memory manager has been completely removed. Use lazy() instead.

Replace with

lazy(initializer)

Atomic lazy initializer, could be used in frozen objects, freezes initializing lambda, so use very carefully. Also, as with other uses of an AtomicReference may potentially leak memory, so it is recommended to use atomicLazy in cases of objects living forever, such as object singletons, or in cases where it's guaranteed not to have cyclical garbage.

Since Kotlin

1.3