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

Some "delegate" instances are incorrectly declared as strong references #21050

Closed
crazytonyli opened this issue Jul 11, 2023 · 0 comments · Fixed by #21068
Closed

Some "delegate" instances are incorrectly declared as strong references #21050

crazytonyli opened this issue Jul 11, 2023 · 0 comments · Fixed by #21068
Assignees

Comments

@crazytonyli
Copy link
Contributor

Enabling weak_delegate swiftlint rule exposes a few places where delegate types are strongly referenced, which cause retain cycles.

diff --git a/.swiftlint.yml b/.swiftlint.yml
index 51ba0c206a..778047ace9 100644
--- a/.swiftlint.yml
+++ b/.swiftlint.yml
@@ -3,6 +3,10 @@ remote_timeout: 10.0
 
 opt_in_rules:
   - overridden_super_call
+  - weak_delegate
 
 overridden_super_call:
   severity: error
+
+weak_delegate:
+  severity: warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant