Reputation: 300
I have a property like this in a UIView subclass
@property(nonatomic, assign) CTTypesetterRef typesetter;
I initiate the TypeSetter in the view constructor:
- (id)initWithFrame:(CGRect)frame andAttributedString:(NSMutableAttributedString * ) pageAttributedString
{
self = [super initWithFrame:frame];
if (self) {
self.attributedString = pageAttributedString;
self.typesetter = CTTypesetterCreateWithAttributedString((CFAttributedStringRef)CFBridgingRetain(self.attributedString));
}
The question is where to release the TypeSetter using CFRelease?
I am using ARC, IOS 7 and Xcode 5
Upvotes: 0
Views: 541
Reputation: 441
in your -dealloc
like you would do with MRR.
just remember that unlike MRR, in ARC you don't have to call [super dealloc]
neither do you need to explicitely call -release
on your ARC managed ivars.
Upvotes: 1