Commit d5fc392e authored by Him188's avatar Him188

Make ByteArrayPool internal

parent 630850c5
......@@ -6,7 +6,7 @@ import kotlinx.io.pool.ObjectPool
internal const val DEFAULT_BYTE_ARRAY_POOL_SIZE = 256
internal const val DEFAULT_BYTE_ARRAY_SIZE = 4096
val ByteArrayPool: ObjectPool<ByteArray> = ByteArrayPoolImpl
internal val ByteArrayPool: ObjectPool<ByteArray> = ByteArrayPoolImpl
private object ByteArrayPoolImpl : DefaultPool<ByteArray>(DEFAULT_BYTE_ARRAY_POOL_SIZE) {
override fun produceInstance(): ByteArray = ByteArray(DEFAULT_BYTE_ARRAY_SIZE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment