delete local reference after newShortArray

dev
xufuji456 3 years ago
parent 08799c74a9
commit 1410df401b
  1. 1
      app/src/main/cpp/audio_player.cpp

@ -384,4 +384,5 @@ void fft_callback(JNIEnv *jniEnv, jobject thiz, jmethodID fft_method, int16_t *
jshortArray dataArray = jniEnv->NewShortArray(samples);
jniEnv->SetShortArrayRegion(dataArray, 0, samples, arg);
jniEnv->CallVoidMethod(thiz, fft_method, dataArray);
jniEnv->DeleteLocalRef(dataArray);
}
Loading…
Cancel
Save