3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 09:34:08 +00:00

Free allocated char arrays in JNI API

Fixes #886
This commit is contained in:
George Karpenkov 2017-03-01 15:22:15 +01:00
parent 4792229c2b
commit dbdb0307db

View file

@ -710,6 +710,9 @@ def mk_java(java_dir, package_name):
java_wrapper.write(' }\n')
elif k == OUT_MANAGED_ARRAY:
java_wrapper.write(' *(jlong**)a%s = (jlong*)_a%s;\n' % (i, i))
elif k == IN and param_type(param) == STRING:
java_wrapper.write(' jenv->ReleaseStringUTFChars(a%s, _a%s);\n' % (i, i));
i = i + 1
# return
if result == STRING: