【发布时间】:2013-11-26 15:19:12
【问题描述】:
我在 UIView 子类中有这样的属性
@property(nonatomic, assign) CTTypesetterRef typesetter;
我在视图构造函数中启动 TypeSetter:
- (id)initWithFrame:(CGRect)frame andAttributedString:(NSMutableAttributedString * ) pageAttributedString
{
self = [super initWithFrame:frame];
if (self) {
self.attributedString = pageAttributedString;
self.typesetter = CTTypesetterCreateWithAttributedString((CFAttributedStringRef)CFBridgingRetain(self.attributedString));
}
问题是在哪里使用 CFRelease 释放 TypeSetter?
我正在使用 ARC、IOS 7 和 Xcode 5
【问题讨论】:
标签: ios memory-management automatic-ref-counting core-foundation