in cxx/fbjni/detail/CoreClasses-inl.h [515:527]
static void allocate(
alias_ref<typename jtype_traits<T>::array_type> array,
jsize start,
jsize length,
T** elements,
size_t* size,
jboolean* isCopy) {
auto buf = array->getRegion(start, length);
FACEBOOK_JNI_THROW_EXCEPTION_IF(!buf);
*elements = buf.release();
*size = length;
*isCopy = true;
}