From 0538dab8ff0e9a54f277aa8d93653b7501c07653 Mon Sep 17 00:00:00 2001 From: santaevpavel Date: Tue, 12 Nov 2024 22:16:18 +0200 Subject: [PATCH] fix memory leak --- packages/jni-swig-stub/realm.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jni-swig-stub/realm.i b/packages/jni-swig-stub/realm.i index d47abfa26c..2d13dfad79 100644 --- a/packages/jni-swig-stub/realm.i +++ b/packages/jni-swig-stub/realm.i @@ -309,7 +309,7 @@ bool realm_object_is_valid(const realm_object_t*); %typemap(argout) uint8_t* %{ SWIG_JavaArrayArgoutSchar(jenv, jarr$argnum, (signed char *)$1, $input); %} -%typemap(freearg) uint8_t*; +%typemap(freearg) signed char **; // Enable passing void** as long[] %apply int64_t[] {void **}; @@ -322,7 +322,7 @@ SWIG_JavaArrayArgoutSchar(jenv, jarr$argnum, (signed char *)$1, $input); %typemap(argout) void ** %{ SWIG_JavaArrayArgoutLonglong(jenv, jarr$argnum, (long long *)$1, $input); %} -%typemap(freearg) void**; +%typemap(freearg) long long**; // Reuse above typemap for void** (from apply int64_t[]) {void **}) to pass various pointer types as // long[]