title: JNI: Invoke JAVA method from C++, returned objects, References and GC
body: <p>What is the rule when a C++ program(!) invokes a java method that returns an object? Is there an outstanding reference to this object? 
  Must I call "DeleteLocalRef" to make sure the object is GCd, or will it be GCd automatically? The reason this is not clear to me, is because in all the examples and official documentation stating that "DeleteLocalRef" is not necessary, it makes sense to me only when a native "C/C++" method is invokes from java. But if the calling thread is a C++ method calling java, how will the JVM know that the object can be GCd?</p>
  
  <p>Along the same lines: If I want to cache the object, must I call "NewGlobalRef"? </p>
  
  <p>Could not find any reference to this...</p>
  
  <p>Thanks for any reference and/or clarification</p>