freeze

Native
1.3
fun <T> T.freeze(): T

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

Exceptions

FreezingException - if freezing is not possible

Return the object itself

See Also

ensureNeverFrozen