Skip to content

Commit ff3a81d

Browse files
committed
Add WithCrt to MutableBuffer
1 parent 375b817 commit ff3a81d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/io/MutableBufferNative.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package aws.sdk.kotlin.crt.io
77
import aws.sdk.kotlin.crt.Allocator
88
import aws.sdk.kotlin.crt.Closeable
99
import aws.sdk.kotlin.crt.CrtRuntimeException
10+
import aws.sdk.kotlin.crt.WithCrt
1011
import kotlinx.cinterop.*
1112
import libcrt.*
1213

@@ -17,7 +18,7 @@ import libcrt.*
1718
@OptIn(ExperimentalForeignApi::class)
1819
public actual class MutableBuffer private constructor(
1920
private val buffer: InnerBuffer,
20-
) : Closeable {
21+
) : WithCrt(), Closeable {
2122
internal constructor(borrowed: CPointer<aws_byte_buf>) : this(InnerBuffer.Borrowed(borrowed))
2223

2324
/**
@@ -74,7 +75,7 @@ private sealed interface InnerBuffer {
7475
*/
7576
data class KBuffer(
7677
private val dest: ByteArray,
77-
) : InnerBuffer {
78+
) : WithCrt(), InnerBuffer {
7879
private val pinned = dest.pin()
7980

8081
override val pointer: CPointer<aws_byte_buf> =

0 commit comments

Comments
 (0)