read

open override fun read(): T?(source)

Attempts to read the value held by this reference.

If the value was garbage-collected, which may happen at any time, this accessor returns null.

One should not assume any additional behavior. In particular, the value may continue to be returned long after it has become unreachable from anywhere else in the program, or disappear sooner than one expected.

In particular, it is not possible for this class to provide a function to check whether the value is still available or not: the value could disappear between that check and the call to this function.