Skip to content

Commit 8206122

Browse files
dryganetskelset
authored andcommitted
Incorrect ref API usage fixed. (facebook#20913)
Summary: release method of local_ref and global_ref doesn't call deallocator, in fact, it leaves the caller responsible for deletion of the reference, while otherwise the reference is released on scope left. Fixes facebook#18292. Pull Request resolved: facebook#20913 Differential Revision: D9616237 Pulled By: hramos fbshipit-source-id: 021aa3e4f039e6b7a98da3e4224c1ee49d5a4921
1 parent 4681612 commit 8206122

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactAndroid/src/main/jni/react/jni/ReadableNativeArray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ local_ref<JArrayClass<jobject>> ReadableNativeArray::importTypeArray() {
113113
jint size = array_.size();
114114
auto jarray = JArrayClass<jobject>::newArray(size);
115115
for (jint i = 0; i < size; i++) {
116-
jarray->setElement(i, ReadableNativeArray::getType(i).release());
116+
jarray->setElement(i, ReadableNativeArray::getType(i).get());
117117
}
118118
return jarray;
119119
}

0 commit comments

Comments
 (0)