mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 09:50:16 +08:00
Make ByteArrayPool internal
This commit is contained in:
parent
630850c54c
commit
d5fc392ecf
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user