title: Calling DeleteLocalRef in java native interface
body: <p>I'm returning a jstring from a JNI method. I delete the local reference to it before returning the value.</p>
  
  <pre><code>JNIEXPORT jstring JNICALL TestJNIMethod( JNIEnv* env, jclass )
  {
      jstring  test_string = env-&gt;NewStringUTF( "test_string_value" );
      env-&gt;DeleteLocalRef( test_string );
      return test_string;
  }
  </code></pre>
  
  <p>Would the calling JAVA method be still able to access the returned jstring or would the Garbage collector cleanup the memory?</p>