All Downloads are FREE. Search and download functionalities are using the official Maven repository.

iosArm64Main.maryk.rocksdb.AbstractNativeReference.kt Maven / Gradle / Ivy

package maryk.rocksdb

import kotlin.native.concurrent.AtomicReference

actual abstract class AbstractNativeReference : AutoCloseable {
    private val isClosed = AtomicReference(false)

    open fun isOwningHandle(): Boolean {
        return !isClosed.value
    }

    override fun close() {
        isClosed.compareAndSet(expected = false, new = true)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy