![JAR search and dependency download from the Maven repository](/logo.png)
commonMain.com.harmony.kotlin.common.Delegates.kt Maven / Gradle / Ivy
package com.harmony.kotlin.common
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
object Delegates {
fun weakReference(value: T):
ReadOnlyProperty = object : ReadOnlyProperty {
private val reference = WeakReference(value)
override fun getValue(thisRef: Any?, property: KProperty<*>): T? = reference.get()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy