I have a code snippet as below:
NSURL *fonturl = [NSURL fileURLWithPath:gdbPath];
CGDataProviderRef fontDataProvider = CGDataProviderCreateWithURL((__bridge CFURLRef)fonturl);
CGFontRef newFont = CGFontCreateWithDataProvider(fontDataProvider);
NSString *newFontName = CFBridgingRelease(CGFontCopyPostScriptName(newFont));
CGDataProviderRelease(fontDataProvider);
CFErrorRef fonterror;
CTFontManagerRegisterGraphicsFont(newFont, &fonterror);
CGFontRelease(newFont);
Here I get a memory leak when I worked with Xcode Instruments. I tried many times to get rid of this with several alternatives. But I could not escape from memory leaks.