JuliaInterop / JavaCall.jl

Call Java from Julia
http://juliainterop.github.io/JavaCall.jl
Other
118 stars 53 forks source link

Fix JNIVector garbage collection, check if JVM destroyed #163

Closed mkitti closed 2 years ago

mkitti commented 2 years ago

Fixes:

  1. Explicitly set own = false with unsafe_wrap since Java should free the array, not Julia
  2. Make sure the JVM has not been destroyed before we to call Release*

cc: @ahnlabb

codecov-commenter commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@96353a4). Click here to learn what that means. The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #163   +/-   ##
=========================================
  Coverage          ?   64.43%           
=========================================
  Files             ?       10           
  Lines             ?      984           
  Branches          ?        0           
=========================================
  Hits              ?      634           
  Misses            ?      350           
  Partials          ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 96353a4...5cbc6c3. Read the comment docs.

mkitti commented 2 years ago

The JNI module should be fixed so that one can just pass the array rather than explicitly having to extract the pointer via pointer.