Created
January 23, 2012 22:36
-
-
Save slembcke/1665894 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If 'self' is assigned to obj.delegate and I don't explicitly copy the block | |
// it crashes with an EXC_BAD_ACCESS in objc_msgSend() calling 'retain' on | |
NSArray *constructors = [NSArray arrayWithObjects: | |
[^(cpVect pos){ | |
GameObject *obj = ...; | |
obj.delegate = self; | |
return obj; | |
} copy], | |
nil | |
]; | |
[self makeThingFrom:cpv( 278, 351) to:cpv( 44, 370) brickConstructors:constructors]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment