Skip to content

Commit

Permalink
To nil the delegate is always a good idea
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Kompanez committed Jun 12, 2011
1 parent 43ec0b8 commit a10a400
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions RTLabelProject/Classes/RTLabel.m
Expand Up @@ -673,14 +673,11 @@ - (void)applyUnderlineColor:(NSString*)value toText:(CFMutableAttributedStringRe
CFAttributedStringSetAttribute(text, CFRangeMake(position, length),kCTUnderlineColorAttributeName, color);
CFRelease(color);
CGColorSpaceRelease(rgbColorSpace);
}
else
{
} else {
value = [value stringByAppendingString:@"Color"];
SEL colorSel = NSSelectorFromString(value);
UIColor *_color = nil;
if ([UIColor respondsToSelector:colorSel])
{
if ([UIColor respondsToSelector:colorSel]) {
_color = [UIColor performSelector:colorSel];
CGColorRef color = [_color CGColor];
CFAttributedStringSetAttribute(text, CFRangeMake(position, length),kCTUnderlineColorAttributeName, color);
Expand Down Expand Up @@ -757,7 +754,9 @@ - (CGFloat)frameHeight:(CTFrameRef)theFrame
return ceil(height);
}

- (void)dealloc {
- (void)dealloc
{
delegate = nil;
//CFRelease(frame);
//CFRelease(framesetter);
self._textComponent = nil;
Expand Down

0 comments on commit a10a400

Please sign in to comment.