aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-20 09:51:23 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-20 09:51:23 +0000
commit326ad6df4b8c99b3dd103ad2a27de6dc09309191 (patch)
tree1f6358c2b022ff68dadb029ed2473fde1f54da64 /Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m
parent79d5e103501c799c22dcb880e33fed0457d6ccd0 (diff)
downloadsequelpro-326ad6df4b8c99b3dd103ad2a27de6dc09309191.tar.gz
sequelpro-326ad6df4b8c99b3dd103ad2a27de6dc09309191.tar.bz2
sequelpro-326ad6df4b8c99b3dd103ad2a27de6dc09309191.zip
• fixed several memory leaks in PSMTabBar for NSMutableParagraphStyle (thanks to report i957) and NSShadows
Diffstat (limited to 'Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m')
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m
index be5cf82d..3bda9cf5 100644
--- a/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMAdiumTabStyle.m
@@ -399,7 +399,7 @@
// Paragraph Style for Truncating Long Text
static NSMutableParagraphStyle *TruncatingTailParagraphStyle = nil;
if (!TruncatingTailParagraphStyle) {
- TruncatingTailParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ TruncatingTailParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[TruncatingTailParagraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:TruncatingTailParagraphStyle range:range];
@@ -995,11 +995,12 @@
NSMutableParagraphStyle *centeredParagraphStyle = nil;
if (!centeredParagraphStyle) {
- centeredParagraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] retain];
+ centeredParagraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[centeredParagraphStyle setAlignment:NSCenterTextAlignment];
}
[attrStr addAttribute:NSParagraphStyleAttributeName value:centeredParagraphStyle range:range];
+ [centeredParagraphStyle release];
[attrStr drawInRect:labelRect];
return;
}