Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

(minor) Forgot to release the CF objects

  • Loading branch information...
commit 097040819e4b22aa5272b6fd45e4a34d4e81aa56 1 parent f6bcee5
@ELLIOTTCABLE authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 YRSolcounter.m
View
7 YRSolcounter.m
@@ -38,8 +38,11 @@ -(id) initWithBundle: (NSBundle*)bundle {
inDirectory: @"Fonts"]];
// Core Foundation pain
- radixFont = CTFontCreateWithGraphicsFont(
- CGFontCreateWithDataProvider(CGDataProviderCreateWithURL((CFURLRef)fontURL)), 14.0, NULL, NULL);
+ CGDataProviderRef cgDataProvider = CGDataProviderCreateWithURL((CFURLRef)fontURL);
+ CGFontRef cgFont = CGFontCreateWithDataProvider(cgDataProvider);
+ radixFont = CTFontCreateWithGraphicsFont(cgFont, 14.0, NULL, NULL);
+ CFRelease(cgFont);
+ CFRelease(cgDataProvider);
// end Core Foundation pain
NSLog(@"radixFont: %@", radixFont);
Please sign in to comment.
Something went wrong with that request. Please try again.