getCharsCritical
context(env: JniEnv, placement: NativePlacement)
fun JString.getCharsCritical(): Pair<CArrayPointer<UShortVar>, Boolean>?(source)
fun JString.getCharsCritical(): Pair<CArrayPointer<UShortVar>, Boolean>?(source)
The semantics of this function is similar to getChars function. If possible, the VM returns a pointer to string elements; otherwise, a copy is made. However, there are significant restrictions on how these functions can be used. In a code segment enclosed by getCharsCritical/releaseCharsCritical calls, the native code must not issue arbitrary JNI calls, or cause the current thread to block.
The restrictions on getCharsCritical/releaseCharsCritical are similar to those on getElementsCritical/releaseElementsCritical.
Since
JDK/JRE 1.2