title: Java JNI- What's the benefit of GetString() vs. GetStringCritical()?
body: <p>According to JNI docs, <code>GetStringCritical()</code> disable garbage collection while you hold on to some memory managed by the JVM. Using this instead of <code>GetString()</code> puts your native at risks of deadlock if you call into the Java layer or perform blocking operation before <code>ReleaseStringCritical()</code> is invoked. So what's the benefit of the Critical function, and if it's synonomous, disabling garbage collection while you access JVM managed memory?</p>