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(core): potential memory leak in WebSocketClient #3624

Merged
merged 1 commit into from
May 2, 2024

Conversation

5d
Copy link
Member

@5d 5d commented Apr 18, 2024

Issue #

Description

In Swift, even if you declare an inner closure with a weak reference to self, the outer closure still has a strong reference to self, which can cause the strong reference cycle.

ref: swiftlang/swift#72391

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d had a problem deploying to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Failure
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d had a problem deploying to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Failure
@5d 5d had a problem deploying to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Failure
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d had a problem deploying to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Failure
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:00 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 22:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 18, 2024 23:16 — with GitHub Actions Inactive
@5d 5d marked this pull request as ready for review April 19, 2024 18:48
@5d 5d requested a review from a team as a code owner April 19, 2024 18:48
@5d 5d merged commit 6f1a089 into main May 2, 2024
135 checks passed
@5d 5d deleted the 5d/potential-memory-leak branch May 2, 2024 16:50
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