Language

JniEnvironment.Arrays.GetFloatArrayElements Method

Definition

Obtains a native-access buffer for Java float-array elements.

public static float* GetFloatArrayElements(Java.Interop.JniObjectReference array, bool* isCopy);
static member GetFloatArrayElements : Java.Interop.JniObjectReference * nativeptr<bool> -> nativeptr<single>

Parameters

array
JniObjectReference

A valid Java float-array reference, kept valid until final release.

isCopy
Boolean*

An optional pointer that receives true for a copied buffer and false for direct access.

Returns

A float pointer, or null if JNI fails. Pair a successful acquisition with ReleaseFloatArrayElements.

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