core-foundation

Retained Core Foundation Property

吃可爱长大的小学妹 提交于 2019-11-25 15:18:30
(Xcode 4.2, iOS 5, ARC ) I have some properties of Core Foundation (/Graphics) objects that should take ownership of their objects. Now in these Apple docs I found this: In OS X v10.6 and later, you can use the __attribute__ keyword to specify that a Core Foundation property should be treated like an Objective-C object for memory management: @property(retain) __attribute__((NSObject)) CFDictionaryRef myDictionary; Unfortunately I couldn't find any elaboration on this. I'm using this: @property (nonatomic, strong) __attribute__((NSObject)) CGImageRef loupeImage; And it seems to work the way I'd