On this page
FreezableAtomicReference
class FreezableAtomicReference<T>
Note: this class is useful only with legacy memory manager. Please use AtomicReference instead.
An atomic reference to a Kotlin object. Can be used in concurrent scenarious, but must be frozen first, otherwise behaves as regular box for the value. If frozen, shall be zeroed out once no longer needed. Otherwise memory leak could happen. To detect such leaks kotlin.native.internal.GC.detectCycles in debug mode could be helpful.
Constructors
<init>
Note: this class is useful only with legacy memory manager. Please use AtomicReference instead.
FreezableAtomicReference(value_: T)
Properties
value
The referenced value. Gets the value or sets the new value. If new value is not null, and this
is frozen - it must be frozen or permanent object.
var value: T
Functions
compareAndSet
compareAndSwap
toString
Returns the string representation of this object.
fun toString(): String
© 2010–2023 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.native.concurrent/-freezable-atomic-reference/