Share via


MemoryFile Constructors

Definition

Overloads

MemoryFile(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

MemoryFile(String, Int32)

Allocates a new ashmem region.

MemoryFile(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected MemoryFile (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.OS.MemoryFile : nativeint * Android.Runtime.JniHandleOwnership -> Android.OS.MemoryFile

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

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

MemoryFile(String, Int32)

Allocates a new ashmem region.

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;I)V", "")]
public MemoryFile (string? name, int length);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;I)V", "")>]
new Android.OS.MemoryFile : string * int -> Android.OS.MemoryFile

Parameters

name
String

optional name for the file (can be null).

length
Int32

of the memory file in bytes, must be positive.

Attributes

Exceptions

if the memory file could not be created.

Remarks

Allocates a new ashmem region. The region is initially not purgable.

Java documentation for android.os.MemoryFile.MemoryFile(java.lang.String, int).

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