Skip to content

Instantly share code, notes, and snippets.

@th-in-gs
Created November 28, 2012 12:58
Show Gist options
  • Save th-in-gs/4161072 to your computer and use it in GitHub Desktop.
Save th-in-gs/4161072 to your computer and use it in GitHub Desktop.
Response to "Surprising ARC performance characteristics" (http://blog.securemacprogramming.com/?p=668)
[myDictionary enumerateKeysAndObjectsUsingBlock: ^(id key, id object, BOOL *stop) {
//...
}];
to:
for(id key in myDictionary) {
id object = myDictionary[key];
//...
}
or even:
for(__unsafe_unretained id key in myDictionary) {
__unsafe_unretained id object = myDictionary[key];
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment