Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
santaevpavel committed Nov 12, 2024
1 parent 12514f3 commit 0538dab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jni-swig-stub/realm.i
Original file line number Diff line number Diff line change
Expand Up @@ -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 **};
Expand All @@ -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[]
Expand Down

0 comments on commit 0538dab

Please sign in to comment.