Skip to content

Commit 94289c5

Browse files
committed
Fix meomory leak for primitive array
1 parent 4625a51 commit 94289c5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/convert.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ for (x, y, z) in [(:jboolean, :(JNI.GetBooleanArrayElements), :(JNI.ReleaseBoole
139139
jl_arr::Array = unsafe_wrap(Array, arr, Int(sz))
140140
jl_arr = deepcopy(jl_arr)
141141
$z(result, arr, Int32(0))
142+
JNI.DeleteLocalRef(result)
142143
return jl_arr
143144
end
144145
end

0 commit comments

Comments
 (0)