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

commonMain.org.jetbrains.skia.impl.Managed.kt Maven / Gradle / Ivy

There is a newer version: 0.6.7
Show newest version
package org.jetbrains.skia.impl

expect abstract class Managed(ptr: NativePointer, finalizer: NativePointer, managed: Boolean = true) : Native {
    open fun close()
    open val isClosed: Boolean
}

inline fun  T.use(block: (T) -> R): R {
    return try {
        block(this)
    } finally {
        this.close()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy