Created
April 9, 2013 22:36
-
-
Save numist/5350030 to your computer and use it in GitHub Desktop.
ARC for malloc!
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
NSMutableData *dataObj = [NSMutableData dataWithLength:length]; | |
objc_setAssociatedObject(self, key, dataObj, OBJC_ASSOCIATION_RETAIN); | |
void *data = [dataObj mutableBytes]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment