isn’t a “weak self” required here?
The reason you sometimes need to use weak self is to avoid retain cycles, where an object (like a view controller) holds an object that has a reference back to the object (like using self within a closure).
In this case, we don’t store the alert object in a property on the view controller so don’t need it. For more details, see this: ios - Should self be captured as strong in a UIAlertAction's handler? - Stack Overflow
actually only in the Instruments course with Luke did i understand about the retain cycle concept, clearly.
Cool! Glad to hear that Luke’s explanation helped.
This topic was automatically closed after 166 days. New replies are no longer allowed.