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 operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Checks whether this weak reference has been cleared.

Link copied to clipboard

Checks whether this weak reference still contains some data.

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

Attempts to read the value held by this reference.

Link copied to clipboard
open override fun toString(): String