internal JvmNativeEnvironment GetNativeFunctionTable(JNIEnvHandle nativeEnvironmentHandle) { IntPtr functionTable; ThrowOnFailure(_rawInterface.GetJNIFunctionTable(_env, out functionTable)); try { jniNativeInterface nativeInterface = (jniNativeInterface)Marshal.PtrToStructure(functionTable, typeof(jniNativeInterface)); return(new JvmNativeEnvironment(this, nativeEnvironmentHandle, nativeInterface)); } finally { if (functionTable != IntPtr.Zero) { Deallocate(functionTable); } } }