I personally tend to use GCD and URLSessionTask a lot, which has a lot of overlap with operations.
The main weakness, as you hint at, is grouping tasks together. I can see operations being a great way to do this.
Iām lazy ;] and havenāt been forced to implement cancellation logic for chained networking tasks recently, so Iāve just been ignoring this. However, I will take another look at operations to do just this.
The concern isnāt that the app will crash, but rather, that the view controller will be around for longer than it should beā¦ basically, the closure would capture the view controller if self was used without making it weak, which could extend its lifetime.
āIf any variable is declared outside of the closureās scope, referencing that variable inside the closureās scope creates another strong reference to that object.ā
In general, itās a good idea to specify [weak self] when using self passed into an @escaping closure, which is exactly whatās happening here. Creating strongSelf creates a temporary strong reference to self, if itās not nil, when the closure is executingā¦ basically, itās so you donāt have to write self? everywhere within the closure.