commonMain.com.ditchoom.buffer.AllocationZone.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of buffer-jvm Show documentation
Show all versions of buffer-jvm Show documentation
Multiplatform bytebuffer that delegates to native byte[] or ByteBuffer
package com.ditchoom.buffer
sealed class AllocationZone {
/** Allocates a buffer in the java heap.*/
object Heap : AllocationZone()
/** Allocates a direct buffer in native memory.*/
object Direct : AllocationZone()
/** Allocates a direct buffer in native shared memory. Requires Android API 27, Oreo MR1. Otherwise defaults to [Direct].*/
object AndroidSharedMemory : AllocationZone()
class Custom(val allocator: (Int) -> PlatformBuffer) : AllocationZone()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy