Skip to content

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

@crazytonyli

Description

@crazytonyli

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions