Here I have some examples for closure strong reference cycles. If I assign a closure to a stored property, I can use a closure capture list to make the captured reference un
self.method
is just a syntactic sugar for creating a closure (with the default capture mode, which is strong): { () in self.method() }
. If you want to use an explicit capture list, don't use the syntactic sugar -- create a closure (which is what it does anyway) explicitly:
{ [unowned self] () in self.method() }