mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-08 11:46:53 +01:00
android : fix llama_batch free (#11014)
This commit is contained in:
parent
a813badbbd
commit
c250ecb315
@ -305,7 +305,9 @@ Java_android_llama_cpp_LLamaAndroid_new_1batch(JNIEnv *, jobject, jint n_tokens,
|
|||||||
extern "C"
|
extern "C"
|
||||||
JNIEXPORT void JNICALL
|
JNIEXPORT void JNICALL
|
||||||
Java_android_llama_cpp_LLamaAndroid_free_1batch(JNIEnv *, jobject, jlong batch_pointer) {
|
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"
|
extern "C"
|
||||||
|
Loading…
Reference in New Issue
Block a user