I assume that there should be a call to DeleteGlobalRef().
See: http://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html#NewGlobalRef