FakeWeakRef

Fake implementation of WeakRef.

Instead of being freed by the garbage-collector, this implementation is only freed when clear is called.

Use this implementation to help trigger edge cases in algorithms that use weak references.

Constructors

Link copied to clipboard
constructor(value: T)

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
open override fun read(): T?

Attempts to read the value held by this reference.