jni: release string characters in conversion to Go string #14

Open
whereswaldon wants to merge 1 commits from whereswaldon/jni:waldon-13-fix-buf-leak into master
Contributor

This change should fix #13 by releasing the string buffer from the JVM after we
convert the string to a Go string. However, I've been having a lot of trouble
building the tests on Linux, and I've run out of time to keep messing with it.
I'm posting this patch in the hope that someone else is better positioned to
validate it. Please do not merge this unless you can verify that it works
properly.

Signed-off-by: Chris Waldon christopher.waldon.dev@gmail.com

This change should fix #13 by releasing the string buffer from the JVM after we convert the string to a Go string. However, I've been having a lot of trouble building the tests on Linux, and I've run out of time to keep messing with it. I'm posting this patch in the hope that someone else is better positioned to validate it. Please do not merge this unless you can verify that it works properly. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
whereswaldon added 1 commit 2025-12-30 09:44:47 -05:00
This change should fix #13 by releasing the string buffer from the JVM after we
convert the string to a Go string. However, I've been having a lot of trouble
building the tests on Linux, and I've run out of time to keep messing with it.
I'm posting this patch in the hope that someone else is better positioned to
validate it. Please do not merge this unless you can verify that it works
properly.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u waldon-13-fix-buf-leak:whereswaldon-waldon-13-fix-buf-leak
git checkout whereswaldon-waldon-13-fix-buf-leak

Merge

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff whereswaldon-waldon-13-fix-buf-leak
git checkout master
git merge --ff-only whereswaldon-waldon-13-fix-buf-leak
git checkout whereswaldon-waldon-13-fix-buf-leak
git rebase master
git checkout master
git merge --no-ff whereswaldon-waldon-13-fix-buf-leak
git checkout master
git merge --squash whereswaldon-waldon-13-fix-buf-leak
git checkout master
git merge --ff-only whereswaldon-waldon-13-fix-buf-leak
git checkout master
git merge whereswaldon-waldon-13-fix-buf-leak
git push origin master
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gmp/jni#14
No description provided.