mirai-core / net.mamoe.mirai.utils / UnsafeWeakRef / <init>

<init>

UnsafeWeakRef(weakRef: WeakRef<T>)

WeakRef that getValue for delegation throws an IllegalStateException if the referent is released by GC. Therefore it returns notnull value only