Don't DeleteLocalRef prematurely.
@@ -419,9 +419,6 @@ JNIEXPORT jstring JNICALL Java_ai_catboost_CatBoostJNIImpl_catBoostModelPredict_
const auto row = (jfloatArray)jenv->GetObjectArrayElement(
jnumericFeaturesMatrix, i);
CB_ENSURE(jenv->IsSameObject(row, NULL) == JNI_FALSE, "got null row");
- Y_SCOPE_EXIT(jenv, row) {
- jenv->DeleteLocalRef(row);
- };
const size_t rowSize = jenv->GetArrayLength(row);
CB_ENSURE(
numericFeatureCount <= rowSize,
