Incorrect ref API usage fixed. (#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 #18292. Pull Request resolved: https://github.com/facebook/react-native/pull/20913 Differential Revision: D9616237 Pulled By: hramos fbshipit-source-id: 021aa3e4f039e6b7a98da3e4224c1ee49d5a4921
This commit is contained in:
parent
792cd0902e
commit
09c78fe968
|
@ -113,7 +113,7 @@ local_ref<JArrayClass<jobject>> ReadableNativeArray::importTypeArray() {
|
|||
jint size = array_.size();
|
||||
auto jarray = JArrayClass<jobject>::newArray(size);
|
||||
for (jint i = 0; i < size; i++) {
|
||||
jarray->setElement(i, ReadableNativeArray::getType(i).release());
|
||||
jarray->setElement(i, ReadableNativeArray::getType(i).get());
|
||||
}
|
||||
return jarray;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue