Skip to content

Commit 9a53d31

Browse files
authored
Merge pull request #135 from ahnlabb/primitive-array-memory
Fix memory leak for primitive array
2 parents 4625a51 + 94289c5 commit 9a53d31

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)