What is the difference between a __weak and a __block reference?
I'm reading Xcode's documentation, and here is something that puzzles me: __block typeof(self) tmpSelf = self; [self methodThatTakesABlock:^ { [tmpSelf doSomething]; }]; The following is copied from the documentation: A block forms a strong reference to variables it captures. If you use self within a block, the block forms a strong reference to self , so if self also has a strong reference to the block (which it typically does), a strong reference cycle results. To avoid the cycle, you need to create a weak (or __block ) reference to self outside the block, as in the example above. I don't