Blocks are Apple’s implementation of closures for C, which are also available for Objective-C and C++.
I'm reading Xcode's documentation, and here is something that puzzles me: __block typeof(self) tmpSelf = self; [self methodThatTakesABlock:^ { [tmpSelf doSomething]; }]; …
objective-c memory-management objective-c-blocks weak-references ownershipI am trying to figure out a way to use typeof to create a weak reference to self for use …
objective-c cocoa automatic-ref-counting objective-c-blocks weak-referencesI have a question about strong and weak references to self in blocks in iOS. I know the proper way …
ios objective-c objective-c-blocksIn tutorials it's written that functionally both are same even closure is more easier then block and its avoided the …
ios objective-c swift closures objective-c-blocksI need to dispatch a block on the main queue, synchronously. I don’t know if I’m currently running …
objective-c ios objective-c-blocks grand-central-dispatchI was wondering if it's possible to store a reference to an anonymous function (block) as an instance variable in …
objective-c objective-c-blocksI am trying to create a (network) synchronized array for the company I work for. While the networking part works …
objective-c objective-c-blocks grand-central-dispatch fifoI was reading the documentation from apple about memory management when I got to autorelease pool blocks and something got …
ios memory-management objective-c-blocks autorelease nsautoreleasepoolI've read over this thread: What does the "__block" keyword mean? which discusses what __block is used for but I'm …
objective-c objective-c-blocks weak-referencesI've a big headache with the topic. I'm working on an application that needs to poll a webserver regularly, in …
iphone objective-c nsurlconnection nsthread objective-c-blocks