Swift also allows you to use closures that cannot possibly create strong reference cycles.
This kind of closure, called a non-escaping closure, does not require you to explicitly refer to
Closures declared as function parameters are non-escaping by default.
Closures in other contexts, such as properties like netWorthChangedHandler, are escaping.
What does escaping mean? Escaping means that a closure passed to a function may be called after the function returns. That is, it escapes the scope of the function it is passed to. If a closure does not escape, the compiler knows that it cannot be called after the function returns, so no strong reference cycle is possible.
You can see this in action. ...