mirai-core / net.mamoe.mirai.utils / weakRef

weakRef

fun <T> T.weakRef(): WeakRef<T>

Provides a weak reference to this The getValue for delegation returns this when this is not released by GC