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

Add ClassType::alloc #272

Merged
merged 4 commits into from
Sep 23, 2022
Merged

Add ClassType::alloc #272

merged 4 commits into from
Sep 23, 2022

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Sep 23, 2022

Add ClassType::alloc helper method for safely allocating an instance of a given class.

While I looked at it, I realized that having ownership on Allocated objects is actually incorrect, so I've removed it; see the docs of Allocated for details.

@madsmtm madsmtm added enhancement New feature or request A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates labels Sep 23, 2022
This also removes the ability to specify ownership of allocated types, see docs of `Allocated` for details.

The changed assembly is just from line numbers changing.
@madsmtm madsmtm added this to the objc2 v0.3 milestone Sep 23, 2022
@madsmtm madsmtm marked this pull request as ready for review September 23, 2022 17:16
@madsmtm madsmtm merged commit b20b486 into master Sep 23, 2022
@madsmtm madsmtm deleted the classtype-alloc branch September 23, 2022 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant