softReference

object softReference : RefMaker

Soft Reference Maker.

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

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

Functions

make
Link copied to clipboard
open override fun <T : Any> make(creator: () -> T): Reference<T>

A Function that creates a reference.