Closed mansbernhardt closed 5 years ago
As for Delegate
I couldn't see an obvious design for supporting multiple weak objects. The most common case is that you have zero or one weak object, and if you have more you just have to do it the old way. As for the signal with(weak:)
you can just add as many as you like as shown in the testDoubleWeakly()
test:
bag += rw.with(weak: object1).with(weak: object2).atOnce().onValue { value, obj1, obj2 in
…)` to help breaking retain cycles.