freeze

fun <T> T.freeze(): T(source)

Deprecated

Error since 2.1

Support for the legacy memory manager has been completely removed. Usages of this function can be safely dropped.

Replace with

this

Freezes object subgraph reachable from this object. Frozen objects can be freely shared between threads/workers.

Since Kotlin

1.3

Return

the object itself

See also

Throws

if freezing is not possible