Skip to content

Conversation

@Ali-RS
Copy link
Member

@Ali-RS Ali-RS commented Jun 4, 2023

This PR makes PrimitiveAllocator the default buffer allocator due to a memory leak issue with AndroidNativeBufferAllocator.

See issue #1990

In the below link you can find out why direct byte buffers allocated via JNI (env->NewDirectByteBuffer()) are not cleaned when GCed but the ones created with ByteBuffer.allocateDirect() are cleaned with GC.

https://stackoverflow.com/a/35364247

@Ali-RS Ali-RS added this to the v3.6.1 milestone Jun 4, 2023
@Ali-RS Ali-RS added the Android label Jun 4, 2023
@Ali-RS
Copy link
Member Author

Ali-RS commented Jun 5, 2023

Unless there's something to discuss, I plan to self-integrate this PR in about 24 hours.

@Ali-RS Ali-RS merged commit 3c13403 into jMonkeyEngine:master Jun 6, 2023
bob0bob added a commit to bob0bob/jmonkeyengine that referenced this pull request Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant