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

Fix a leak related to use of function used in a closure #457

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

prabhuamol
Copy link
Contributor

There is a leak in fileprivate lazy var loader: DataLoader<CacheKey, Record> because the method implicitly uses self. Making the capture explicit and breaking the retain cycle here. This was also covered in WWDC 2024 analyze heap memory talk https://developer.apple.com/wwdc24/10173?time=1748

Leak detected via instruments
Screenshot 2024-08-07 at 11 41 24 PM

@apollo-cla
Copy link

@prabhuamol: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

Copy link

netlify bot commented Aug 8, 2024

👷 Deploy request for eclectic-pie-88a2ba pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit af5b76c

Copy link

netlify bot commented Aug 8, 2024

👷 Deploy request for apollo-ios-docc pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit af5b76c

Copy link
Member

@calvincestari calvincestari left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @prabhuamol.

@calvincestari calvincestari merged commit a48ad85 into apollographql:main Aug 8, 2024
28 checks passed
BobaFetters pushed a commit that referenced this pull request Aug 8, 2024
7d0c7e9c Fix a leak related to use of function used in a closure (#457)

git-subtree-dir: apollo-ios
git-subtree-split: 7d0c7e9c70fa1cfeefa7196f14b2297eb97b448f
BobaFetters pushed a commit that referenced this pull request Aug 8, 2024
…sed in a closure

git-subtree-dir: apollo-ios
git-subtree-mainline: c3afbf4
git-subtree-split: 7d0c7e9c70fa1cfeefa7196f14b2297eb97b448f
@prabhuamol prabhuamol deleted the fixleak branch August 9, 2024 13:56
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.

3 participants