Skip to content
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

Release JSPropertyNameArrayRef. Retain string. #29

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

waywardmonkeys
Copy link
Contributor

Since JSObjectCopyPropertyNames returns the name array under the create rule, we need to release it when it is dropped.

Since it owns the strings, and the strings can outlive the name array (like when iterating over the names and storing the string references), we need to retain them to keep them alive.

Since `JSObjectCopyPropertyNames` returns the name array under the
create rule, we need to release it when it is dropped.

Since it owns the strings, and the strings can outlive the name
array (like when iterating over the names and storing the string
references), we need to retain them to keep them alive.
@waywardmonkeys
Copy link
Contributor Author

@Hywan Thoughts?

@waywardmonkeys
Copy link
Contributor Author

@Hywan Checking in on this before I land it in a while…

@waywardmonkeys waywardmonkeys merged commit e04beed into main Nov 16, 2023
5 checks passed
@waywardmonkeys waywardmonkeys deleted the property-name-array-release branch November 16, 2023 18:00
@Hywan
Copy link
Contributor

Hywan commented Nov 17, 2023

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants