Weak and Unowned References in Swift

Hector Matos: At this point we have a retain cycle. You see, closures in Swift behave exactly like blocks in Objective-C. 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. The only exceptions to this are variables that use value … Continue reading Weak and Unowned References in Swift