Skip to content

Commit

Permalink
Incorrect ref API usage fixed. (#20913)
Browse files Browse the repository at this point in the history
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: #20913

Differential Revision: D9616237

Pulled By: hramos

fbshipit-source-id: 021aa3e4f039e6b7a98da3e4224c1ee49d5a4921
  • Loading branch information
dryganets authored and facebook-github-bot committed Aug 31, 2018
1 parent 792cd09 commit 09c78fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 09c78fe

Please sign in to comment.