mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-05 21:16:50 +08:00
Fixed memory leak in Java native binding
This commit is contained in:
@@ -85,6 +85,7 @@ JNIEXPORT jstring JNICALL Java_com_openalpr_jni_Alpr_native_1recognize___3B
|
|||||||
AlprResults results = nativeAlpr->recognize(cvec);
|
AlprResults results = nativeAlpr->recognize(cvec);
|
||||||
std::string json = Alpr::toJson(results);
|
std::string json = Alpr::toJson(results);
|
||||||
|
|
||||||
|
delete buf;
|
||||||
return env->NewStringUTF(json.c_str());
|
return env->NewStringUTF(json.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user