android : fix llama_batch free (#11014)

This commit is contained in:
ag2s20150909 2024-12-30 20:35:13 +08:00 committed by GitHub
parent a813badbbd
commit c250ecb315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -305,7 +305,9 @@ Java_android_llama_cpp_LLamaAndroid_new_1batch(JNIEnv *, jobject, jint n_tokens,
extern "C"
JNIEXPORT void JNICALL
Java_android_llama_cpp_LLamaAndroid_free_1batch(JNIEnv *, jobject, jlong batch_pointer) {
llama_batch_free(*reinterpret_cast<llama_batch *>(batch_pointer));
//llama_batch_free(*reinterpret_cast<llama_batch *>(batch_pointer));
const auto batch = reinterpret_cast<llama_batch *>(batch_pointer);
delete batch;
}
extern "C"