weakReference

object weakReference : RefMaker

Weak Reference Maker.

Use this with refSingleton or refMultiton to bind a weak singleton or multiton.

A weak singleton is guaranteed to be unique inside the JVM but not during the application lifetime. It will be GC'd if there are no strong references to it and therefore may be re-created later.

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
make
Link copied to clipboard
open override fun <T : Any> make(creator: () -> T): Reference<T>
A Function that creates a reference.
toString
Link copied to clipboard
open fun toString(): String