The khiin::engine::Engine is created as a std::unique_ptr. It should be released and delivered back to Kotlin as a regular Long to keep the Engine instance available throughout the app lifecycle. Engine methods should pass this pointer back through JNI, together with the protobuf command to send to the engine. Engine instance must be deleted when the app/service shuts down.
The
khiin::engine::Engine
is created as astd::unique_ptr
. It should be released and delivered back to Kotlin as a regular Long to keep theEngine
instance available throughout the app lifecycle. Engine methods should pass this pointer back through JNI, together with the protobuf command to send to the engine. Engine instance must be deleted when the app/service shuts down.