aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFavoriteTextFieldCell.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPFavoriteTextFieldCell.m')
-rw-r--r--Source/SPFavoriteTextFieldCell.m12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/SPFavoriteTextFieldCell.m b/Source/SPFavoriteTextFieldCell.m
index ea460af0..355ee459 100644
--- a/Source/SPFavoriteTextFieldCell.m
+++ b/Source/SPFavoriteTextFieldCell.m
@@ -121,8 +121,8 @@
(([self isHighlighted]) && (![[self highlightColorWithFrame:cellFrame inView:controlView] isEqualTo:[NSColor secondarySelectedControlColor]])) ? [self invertFontColors] : [self restoreFontColors];
// Construct and get the sub text attributed string
- NSAttributedString *mainString = [[self attributedStringForFavoriteName] autorelease];
- NSAttributedString *subString = [[self constructSubStringAttributedString] autorelease];
+ NSAttributedString *mainString = [self attributedStringForFavoriteName];
+ NSAttributedString *subString = [self constructSubStringAttributedString];
NSRect subFrame = NSMakeRect(0.0, 0.0, [subString size].width, [subString size].height);
@@ -169,8 +169,8 @@
- (NSSize)cellSize
{
NSSize cellSize = [super cellSize];
- NSAttributedString *mainString = [[self attributedStringForFavoriteName] autorelease];
- NSAttributedString *subString = [[self constructSubStringAttributedString] autorelease];
+ NSAttributedString *mainString = [self attributedStringForFavoriteName];
+ NSAttributedString *subString = [self constructSubStringAttributedString];
// 15 := indention 10 from image to string plus 5 px padding
CGFloat theWidth = MAX([mainString size].width, [subString size].width) + (([self image] != nil) ? [[self image] size].width : 0) + 15;
@@ -225,7 +225,7 @@
// -------------------------------------------------------------------------------
- (NSAttributedString *)constructSubStringAttributedString
{
- return [[NSAttributedString alloc] initWithString:favoriteHost attributes:[self subStringAttributedStringAttributes]];
+ return [[[NSAttributedString alloc] initWithString:favoriteHost attributes:[self subStringAttributedStringAttributes]] autorelease];
}
// -------------------------------------------------------------------------------
@@ -235,7 +235,7 @@
// -------------------------------------------------------------------------------
- (NSAttributedString *)attributedStringForFavoriteName
{
- return [[NSAttributedString alloc] initWithString:favoriteName attributes:[self mainStringAttributedStringAttributes]];
+ return [[[NSAttributedString alloc] initWithString:favoriteName attributes:[self mainStringAttributedStringAttributes]] autorelease];
}
// -------------------------------------------------------------------------------