Skip to content

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