-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect ref API usage fixed. #20913
Conversation
Holdon on that, I need to finish some testing, I might go too aggressive - not sure about the global_ref yet, need to make sure it doesn't break anything. |
Generated by 🚫 dangerJS |
… global_ref doesn't call deallocator, in fact it makes the caller responsible for deletion of the reference, while otherwise the reference is released on scope leave.
74cd97f
to
cc26fea
Compare
I left only fix relevant to the issue. Everything else was correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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
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
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
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.
Test Plan:
If there is a mistake in the change it won't even run.
Pass the big array (bigger than 512 elements) and call importTypes method on it. If it doesn't crash the problem is fixed.
Release Notes:
[ANDROID] [BUGFIX] [JNI] - Fixes spontaneous local_ref table overflow.