Hello Swift Community, According to the Swift Programming Language Book:
“A strong reference cycle can also occur if you assign a closure to a property of a class instance, and the body of that closure captures the instance.” Excerpt From: Apple Inc. “The Swift Programming Language.” iBooks. https://itun.es/pl/jEUH0.l Does it mean that example below is valid? ( no need to use capture list ): import Swift class A {} class Foo { var object = A() func bar() { Bar().start { print(self.object) } } } class Bar { func start(completion: () -> ()) { completion() } } As far as I understand, Leak will occur when class Bar stores completion in the property. But are there any other edge cases ? Regars, Greg Leszek _______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users