we were using the version of ReleaseIntArrayElements that doesn't always keep changes to the array.
To match the C++ APIs