We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 095379c commit a0054efCopy full SHA for a0054ef
src/main/kotlin/uno/buffer/buffer.kt
@@ -78,4 +78,9 @@ fun ByteBuffer.use(block: (ByteBuffer) -> Unit) {
78
destroy()
79
}
80
81
-fun withBufferBig(size: Int, block: (ByteBuffer) -> Unit) = bufferBig(size).use(block)
+fun withBufferBig(size: Int, block: ByteBuffer.() -> Unit) {
82
+ with(bufferBig(size)) {
83
+ block()
84
+ destroy()
85
+ }
86
+}
0 commit comments