Language

JniRuntime.JniObjectReferenceManager.ReleaseLocalReference Method

Definition

Removes a local reference from managed accounting without deleting its JNI handle.

public virtual IntPtr ReleaseLocalReference(ref Java.Interop.JniObjectReference reference, ref int localReferenceCount);
abstract member ReleaseLocalReference : JniObjectReference * int -> nativeint
override this.ReleaseLocalReference : JniObjectReference * int -> nativeint

Parameters

reference
JniObjectReference

The local reference whose handle is transferred to the caller. The managed value is invalidated without deleting the native reference.

localReferenceCount
Int32

The count to decrement when reference has a nonzero handle.

Returns

IntPtr

nativeint

The transferred JNI handle, or Zero if the supplied handle is zero.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to