We’ve touched on this topic in the
Issue #3. Well, there are always more places to find retain cycles in.
If you’re binding a publisher’s values to a property of a class, watch out for which operator you use. Using
.assign(to: .property, on: self) will retain
self and may cause a retain cycle. On the other hand using
.assign(to: $property) retains the property’s publisher, not
self.
This old forums thread has an example of leaking code. Know your enemy!