I have this line of code:
__weak NSBlockOperation *weakOperation = operation;
which causes this compiler error:
__weak attribute cannot be specified on automatic variable.
The reason for this is that I do not support ARC (not yet ready to make a switch). Therefore, from another StackOverFlow question, I was recommended to use:
__unsafe_unretained NSBlockOperation *weakOperation = operation;
Because of what, the error disappears, but for context I use it, it does not work (see this question if it is interesting: How to cancel NSOperationQueue ).
So my question is, can I replace the __weak keyword in this case to get rid of this warning? Everything works correctly when I use __weak , but I am afraid that it will not be delayed in future versions of iOS.
source share