WeakReference

expect class WeakReference<T : Any>(referred: T)
actual class WeakReference<T : Any>(referred: T)
actual typealias WeakReference<T> = <Error class: unknown class><T>

Constructors

Link copied to clipboard
expect constructor(referred: T)
actual constructor(referred: T)

Functions

Link copied to clipboard
expect fun clear()
actual fun clear()
Link copied to clipboard
expect fun get(): T?
actual fun get(): T?

The weakly referenced object. If the garbage collector collected the object, this returns null.