mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-12 18:50:20 +08:00
Add unstable api note
This commit is contained in:
parent
2f59504e04
commit
02d837db00
@ -62,6 +62,8 @@ fun <T> WeakRef<T>.unsafe(): UnsafeWeakRef<T> = UnsafeWeakRef(this)
|
|||||||
/**
|
/**
|
||||||
* Provides a weak reference to [this].
|
* Provides a weak reference to [this].
|
||||||
* The `getValue` for delegation throws an [IllegalStateException] if the referent is released by GC. Therefore it returns notnull value only
|
* The `getValue` for delegation throws an [IllegalStateException] if the referent is released by GC. Therefore it returns notnull value only
|
||||||
|
*
|
||||||
|
* **UNSTABLE API**: It is strongly suggested not to use this api
|
||||||
*/
|
*/
|
||||||
fun <T> T.unsafeWeakRef(): UnsafeWeakRef<T> = UnsafeWeakRef(this.weakRef())
|
fun <T> T.unsafeWeakRef(): UnsafeWeakRef<T> = UnsafeWeakRef(this.weakRef())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user