Skip to content

Commit

Permalink
Fixed some indenting from previous pull request. Moved some CFRelease…
Browse files Browse the repository at this point in the history
…s higher.
  • Loading branch information
odrobnik committed Feb 19, 2011
1 parent 5adff3a commit 7552d79
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Classes/DTCoreTextLayoutFrame.m
Expand Up @@ -43,7 +43,8 @@ - (void)dealloc
{
CFRelease(_textFrame);
}
[_lines release];
[_lines release];

[super dealloc];
}

Expand Down
4 changes: 2 additions & 2 deletions Classes/DTTextAttachment.m
Expand Up @@ -16,8 +16,8 @@ @implementation DTTextAttachment

- (void) dealloc
{
[contents release];
[super dealloc];
[contents release];
[super dealloc];
}


Expand Down
13 changes: 6 additions & 7 deletions Classes/NSAttributedString+HTML.m
Expand Up @@ -327,7 +327,7 @@ - (id)initWithHTML:(NSData *)data options:(NSDictionary *)options documentAttrib
// trim whitespace
NSString *htmlString = [_htmlString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];

[_htmlString release];
[_htmlString release];

NSMutableAttributedString *tmpString = [[[NSMutableAttributedString alloc] init] autorelease];

Expand Down Expand Up @@ -458,7 +458,7 @@ - (id)initWithHTML:(NSData *)data options:(NSDictionary *)options documentAttrib
DTTextAttachment *attachment = [[[DTTextAttachment alloc] init] autorelease];
attachment.contents = image;
attachment.size = CGSizeMake(width, height);

CTRunDelegateRef embeddedObjectRunDelegate = createEmbeddedObjectRunDelegate(attachment);

CTParagraphStyleRef paragraphStyle = createParagraphStyle(0, 0, 0, 0, 0);
Expand Down Expand Up @@ -904,6 +904,7 @@ - (id)initWithHTML:(NSData *)data options:(NSDictionary *)options documentAttrib
NSDictionary *fontAttributes = [currentFontDescriptor fontAttributes];
CTFontDescriptorRef fontDesc = CTFontDescriptorCreateWithAttributes((CFDictionaryRef)fontAttributes);
CTFontRef font = CTFontCreateWithFontDescriptor(fontDesc, currentFontDescriptor.pointSize, NULL);
CFRelease(fontDesc);

CGFloat paragraphSpacing = [[currentTag objectForKey:@"ParagraphSpacing"] floatValue];
CGFloat paragraphSpacingBefore = [[currentTag objectForKey:@"ParagraphSpacingBefore"] floatValue];
Expand Down Expand Up @@ -942,7 +943,9 @@ - (id)initWithHTML:(NSData *)data options:(NSDictionary *)options documentAttrib

[attributes setObject:(id)font forKey:(id)kCTFontAttributeName];
[attributes setObject:(id)paragraphStyle forKey:(id)kCTParagraphStyleAttributeName];
CFRelease(paragraphStyle);

CFRelease(font);
CFRelease(paragraphStyle);

NSString *fontColor = [currentTagAttributes objectForKey:@"color"];

Expand Down Expand Up @@ -1043,10 +1046,6 @@ - (id)initWithHTML:(NSData *)data options:(NSDictionary *)options documentAttrib
[tagString release];

previousAttributes = attributes;

CFRelease(font);
CFRelease(fontDesc);
//CFRelease(paragraphStyle);
}

}
Expand Down

0 comments on commit 7552d79

Please sign in to comment.