search for: __unsafe_unretained

Displaying 1 result from an estimated 1 matches for "__unsafe_unretained".

2012 Oct 02
1
[LLVMdev] Error prone default memory capturing convention of blocks.
...cently I have 3 retain cycles in my program, no one appeared in Leaks. So the main point is prevent such errors at first place, not to rely on that tool will find it. Proposition: Any variable captured in block must have explicit qualifier to specify memory capturing semantic: __retain, __weak, __unsafe_unretained. Qualifier is obligatory, no defaults allowed. Code will look something like this: 1) NSString* theLocalVariable = … ...^ { ... __weak self; self.blabla = ... … [self blabla:(__retain theLocalVariable)]; } 2) { self.blabla = … // compile error: missing memory capture semantic qualifie...