mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
space leak in the Java binding
This commit is contained in:
@@ -53,7 +53,9 @@ gu2j_string(JNIEnv *env, GuString s) {
|
|||||||
static GuString
|
static GuString
|
||||||
j2gu_string(JNIEnv *env, jstring s, GuPool* pool) {
|
j2gu_string(JNIEnv *env, jstring s, GuPool* pool) {
|
||||||
const char *str = (*env)->GetStringUTFChars(env, s, 0);
|
const char *str = (*env)->GetStringUTFChars(env, s, 0);
|
||||||
return gu_str_string(str, pool);
|
GuString s = gu_str_string(str, pool);
|
||||||
|
(*env)->ReleaseStringUTFChars(env, s, str);
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void*
|
static void*
|
||||||
|
|||||||
Reference in New Issue
Block a user