Skip to content

Commit

Permalink
Fix meomory leak for primitive array
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnlabb committed Feb 2, 2021
1 parent 4625a51 commit 94289c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/convert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ for (x, y, z) in [(:jboolean, :(JNI.GetBooleanArrayElements), :(JNI.ReleaseBoole
jl_arr::Array = unsafe_wrap(Array, arr, Int(sz))
jl_arr = deepcopy(jl_arr)
$z(result, arr, Int32(0))
JNI.DeleteLocalRef(result)
return jl_arr
end
end
Expand Down

0 comments on commit 94289c5

Please sign in to comment.