Language

JniEnvironment.Arrays.CreateMarshalObjectArray<T> Method

Definition

Reuses a matching Java object-array wrapper or creates one from a managed sequence.

public static Java.Interop.JavaObjectArray<T>? CreateMarshalObjectArray<T>(System.Collections.Generic.IEnumerable<T>? value);
static member CreateMarshalObjectArray : seq<'T> -> Java.Interop.JavaObjectArray<'T>

Type Parameters

T

The managed element type used by the runtime marshaler.

Parameters

value
IEnumerable<T>

The managed element sequence, or null.

Returns

The matching supplied wrapper, a new wrapper containing copied elements, or null if value is null.

Remarks

New wrappers are marked for temporary marshaling cleanup; existing wrappers are returned unchanged. Use DisposeUnlessReferenced after marshaling to clean up a temporary wrapper.

Applies to