Język

Buffer.GetDirectBufferAddress Method

Definition

Gets the starting address of this direct buffer's memory region.

public IntPtr GetDirectBufferAddress();
member this.GetDirectBufferAddress : unit -> nativeint

Returns

IntPtr

nativeint

The starting address, or Zero if this buffer is not direct or its memory region is unavailable.

Remarks

The address is the start of the memory region, not the current buffer position. This method does not copy the data or transfer ownership of the memory. Keep the buffer alive and its memory valid while you use the address.

.NET for Android implementation. See also the JNI GetDirectBufferAddress contract.

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