FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix JNI array leaking by freeing the memory after conversion by satanja · Pull Request #167 · JuliaInterop/JavaCall.jl · GitHub

Fix JNI array leaking by freeing the memory after conversion - #167

Merged
mkitti merged 1 commit into
JuliaInterop:masterfrom
satanja:jni_array_leak_fix
Jul 18, 2023
Merged

Fix JNI array leaking by freeing the memory after conversion#167
mkitti merged 1 commit into
JuliaInterop:masterfrom
satanja:jni_array_leak_fix

Conversation

satanja commented Jul 17, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

It was observed that JavaCall was leaking memory when getting arrays of objects from Java. This is due to the fact that arrays from Java are converted into Julia arrays by copying the elements over from the Java array, but the Java array is subsequently not freed from memory, causing a leak as at the end of the Julia code the pointer is garbage collected. In #135 essentially the same leak was fixed, but only for primitive arrays, not arrays of Java objects, etc. This PR aims to solve the issue for the remaining cases.

mkitti commented Jul 17, 2023
edited
Loading

Copy link
Copy Markdown
Member

Thank you. I will take a look.

Also, how well does the master branch work for you? The release process got stalled, but we are due for a breaking release.

I'm targeting August 7th for merging and release. Please ping me if not released by then.

satanja commented Jul 17, 2023

Copy link
Copy Markdown
Contributor Author

These are the results when I build and test the repository, see output.txt. I'm running on Julia 1.8.5 and Windows 10.

mkitti merged commit d7f3136 into JuliaInterop:master Jul 18, 2023

satanja commented Aug 14, 2023

Copy link
Copy Markdown
Contributor Author

@mkitti What's the status on the release?

mkitti commented Aug 14, 2023

Copy link
Copy Markdown
Member

I will arrange for it today.

mkitti commented Aug 15, 2023

Copy link
Copy Markdown
Member

I'm trying to include #165 . Almost there.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL