localIntoWeakRef

context(env: JniEnv)
fun <T : JRef<O>, O : _jobject> T.localIntoWeakRef(): T?(source)

Converts ordinal local ref into a global weak one.

May return null if:

  • the system has run out of memory

  • the receiver was a weak global reference and has already been garbage collected.

Since

JDK/JRE 1.2

Throws

if the system runs out of memory.