Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Env class and its uses #597

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

CedNaru
Copy link
Member

@CedNaru CedNaru commented Apr 2, 2024

I fixed an issue with the Env stored in the Jvm not being thread dependent, which could cause memory leak when multithread was used.
On top of that. I removed as many jni::Jvm::current_env() as possible. Opting to pass its reference to the deepest part of the api.
Most calls to that function now are going to be in the overridden Godot methods (like in Script or ScriptInstance).
I couldn't remove the use of it in destructors as they have no parameters.

@CedNaru CedNaru requested review from piiertho and chippmann April 2, 2024 14:21
@CedNaru CedNaru force-pushed the gd_kotlin/reliable_jni_env branch from 4c2eabf to f3a17cd Compare April 3, 2024 05:05
@CedNaru CedNaru force-pushed the improvement/jvm_wrapper branch from d22383e to 439973f Compare April 3, 2024 17:43
@CedNaru CedNaru force-pushed the gd_kotlin/reliable_jni_env branch 2 times, most recently from d9ceefe to 414697d Compare April 3, 2024 19:22
Base automatically changed from improvement/jvm_wrapper to gd_kotlin_rework April 5, 2024 12:04
@CedNaru CedNaru force-pushed the gd_kotlin/reliable_jni_env branch from 414697d to bc30811 Compare April 5, 2024 12:07
@CedNaru CedNaru merged commit befbc89 into gd_kotlin_rework Apr 5, 2024
35 checks passed
@CedNaru CedNaru deleted the gd_kotlin/reliable_jni_env branch April 5, 2024 17:09
CedNaru added a commit that referenced this pull request Apr 30, 2024
CedNaru added a commit that referenced this pull request May 7, 2024
CedNaru added a commit that referenced this pull request May 8, 2024
CedNaru added a commit that referenced this pull request May 9, 2024
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.

3 participants