Reputation: 944
I am developing a program, that uses Core Text... And I have a leak in the following line of code:
NSString *familyName = (NSString*)CTFontCopyFamilyName(font);
When I write CFRelease((CFStringRef)familyName);
I get bad access exception. When I write [familyName release];
I have the same issue. Can anyone help me please?
Upvotes: 0
Views: 149
Reputation: 11839
Use -
NSString *familyName = [(NSString*)CTFontCopyFamilyName(font) autorelease];
Upvotes: 2