3 ms·
What do you mean? Potential reference cycles are a compile time error in Swift. That’s the whole point of the @escaping annotation
by fingerlocks 4y ago
What do you mean? Potential reference cycles are a compile time error in Swift. That’s the whole point of the @escaping annotation
- yyyk 4y agoSo this[0] wasn't current despite being edited half a year ago? I guess I'm guilty of the same mistake the post had: criticizing without understanding the state of the art on the other side (at least I didn't miss it by 20 years and on an entire subfield of Computer Science). [0] https://stackoverflow.com/questions/32262172/how-can-identify-strong-reference-cycles-in-swift https://stackoverflow.com/questions/32262172/how-can-identif...
- jumhyn 4y agoNo, the SO post is accurate—it’s trivially easy to create strong reference cycles in Swift and @escaping annotation is only of limited use in detecting strong reference cycles. Though Swift also broadly pushes towards the use of value types for which creating reference cycles of any kind is impossible since they’re values, not references!