JniHandle

abstract class JniHandle : AutoCloseable

Known direct subclasses
CompiledModel

Class that represents a compiled LiteRT model.

Environment

Environment to hold configuration options for LiteRT runtime.

Model

Model represents a LiteRT model file.

TensorBufferRequirements

Requirements for allocating a TensorBuffer.

TensorBuffer

TensorBuffer represents the raw memory where tensor data is stored.


A base class for all Kotlin types that wrap a JNI handle.

Summary

Public functions

final Unit

Clean up the handle safely to avoid releasing the same JNI handle multiple times.

Protected functions

Unit

Asserts that the handle is not destroyed, otherwise throws an IllegalStateException.

abstract Unit

Clean up resources associated with the handle.

Public functions

close

final fun close(): Unit

Clean up the handle safely to avoid releasing the same JNI handle multiple times.

Protected functions

assertNotDestroyed

protected fun assertNotDestroyed(): Unit

Asserts that the handle is not destroyed, otherwise throws an IllegalStateException.

destroy

protected abstract fun destroy(): Unit

Clean up resources associated with the handle.