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 autoreleasepool_leaking #112

Closed
wants to merge 1 commit into from
Closed

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Jan 6, 2022

Idea for #86 and/or #30.

Another idea for this:

impl AutoreleasePool {
    const LEAKING: &'static Self = {
        &*ManuallyDrop::new(unsafe { Self::new_leaking() })
    };
}

But that would always yield a static lifetime, which would mean it had to be unsafe somehow!

@madsmtm madsmtm added the enhancement New feature or request label Jan 6, 2022
@madsmtm madsmtm added this to the objc2 v0.3 milestone Apr 2, 2022
@madsmtm madsmtm mentioned this pull request Apr 3, 2022
8 tasks
@madsmtm madsmtm removed this from the objc2 v0.3 milestone Apr 4, 2022
@madsmtm madsmtm added the A-objc2 Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` crates label May 23, 2022
@madsmtm
Copy link
Owner Author

madsmtm commented Jul 7, 2022

I'm going to close this since #191 added Id::autorelease_return which basically covers all the use-cases this would've had.

@madsmtm madsmtm closed this Jul 7, 2022
@madsmtm madsmtm deleted the autoreleasepool-leaking branch July 7, 2022 03:30
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