Saturday, January 24, 2015

Swift Capture Lists

Russ Bishop:

The Language Guide claims you should use unowned if the closure and containing object reference each other and will be destroyed at the same time. Presumably that’s to avoid the cost of safely nil’ing out a weak reference in an object that’s about to dealloc anyway.

Most people aren’t aware that you can create new named values here as well[…]

Comments RSS · Twitter

Leave a Comment