Skip to content

Commit

Permalink
Merge pull request #135 from ahnlabb/primitive-array-memory
Browse files Browse the repository at this point in the history
Fix memory leak for primitive array
  • Loading branch information
mkitti authored Feb 2, 2021
2 parents 4625a51 + 94289c5 commit 9a53d31
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 9a53d31

Please sign in to comment.