Skip to content

[6.1] Fix retain cycle in LLBuildProgressTracker #8308

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

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Feb 26, 2025

  • Explanation: self.taskTracker.onTaskProgressUpdateText captured self strongly, creating a reference cycle in LLBuildProgressTracker, which caused it to never get deallocated.
  • Scope: Manifested as a memory leak in SourceKit-LSP
  • Issue: n/a
  • Original PR: Fix retain cycle in LLBuildProgressTracker #8305
  • Risk: Low, just captures a delegate weakly
  • Testing: Verified that this fixes the memory leak we saw
  • Reviewer: @MaxDesiatov

`self.taskTracker.onTaskProgressUpdateText` captured `self` strongly, creating a reference cycle in `LLBuildProgressTracker`, which caused it to never get deallocated.
@ahoppen
Copy link
Member Author

ahoppen commented Feb 26, 2025

@swift-ci Please test

@ahoppen ahoppen merged commit f3f8217 into swiftlang:release/6.1 Feb 26, 2025
5 checks passed
@ahoppen ahoppen deleted the 6.1/fix-retain-cycle branch February 26, 2025 17:17
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