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 missing unowned specifiers #11248

Merged
merged 3 commits into from May 10, 2023
Merged

Add missing unowned specifiers #11248

merged 3 commits into from May 10, 2023

Conversation

paulb777
Copy link
Member

@paulb777 paulb777 commented May 8, 2023

Add a weak specifier that was missed in the Swift transition. [Edit: unowned instead of weak. See discussion below.]

Testing seems to show that this causes a retain cycle leak for ObjC clients. The Swift runtime seems to detect the cycle and avoid the leak, even without this change.

Copy link
Member

@ncooke3 ncooke3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! curious, how did this originally surface? via the analyzer?

@paulb777
Copy link
Member Author

paulb777 commented May 9, 2023

I discovered it working on the Auth Swift implementation. See #11246

@paulb777 paulb777 requested a review from ryanwilson May 10, 2023 01:04
@paulb777 paulb777 changed the title Add missing weak specifiers Add missing unowned specifiers May 10, 2023
@paulb777 paulb777 merged commit e73e86a into master May 10, 2023
43 of 44 checks passed
@paulb777 paulb777 deleted the pb-plug-leaks branch May 10, 2023 14:57
@firebase firebase locked and limited conversation to collaborators Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants