From 94289c5c1cf60e459d0ee4fb5b8c21b6b98282d6 Mon Sep 17 00:00:00 2001 From: Johannes Ahnlide Date: Tue, 2 Feb 2021 10:50:36 +0100 Subject: [PATCH] Fix meomory leak for primitive array --- src/convert.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/convert.jl b/src/convert.jl index 078a8be..e7605df 100644 --- a/src/convert.jl +++ b/src/convert.jl @@ -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