[self.foo setBlock:^{
[self doSomething]; // causes warning
}];
versus
[self.foo setBlock:^{
self.bar = baz; // does not cause warning
}];
The warning being "Capturing self
strongly in this block is likely to lead to a retain cycle."
Don't both lead to a strong reference?
This is a compiler bug and you should file a bug report with Apple.
Both are the same, a.b = c
is just a different way for writing [a setB: c]
. If the compiler handles one differently from the other this is a bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With