Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
GetPrimitiveArrayCritical should not be used #19
Comments
bgilbert
added the
defect
label
May 15, 2014
|
In theory this should be fine. I don't see any rules we are breaking here with the critical methods. As far as I can see, the alternative is to use the NIO |
bgilbert
added this to the
v1.0
milestone
Jan 16, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bgilbert commentedMay 15, 2014
The JNI code uses
GetPrimitiveArrayCritical()to get destination buffers forread_region()andread_associated_image(). This was presumably done to avoid an extra buffer copy, but the JNI documentation cautions that the*Criticalmethods should not be used for long-running operations.