adium-1.4 2648:ab4389becd83: Fixing a few leaks...
commits at adium.im
commits at adium.im
Tue Oct 27 17:27:08 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/ab4389becd83
revision: 2648:ab4389becd83
author: Stephen Holt <sholt at adium.im>
date: Tue Oct 27 13:19:00 2009 -0400
Fixing a few leaks...
Subject: adium-1.4 2649:b8864f1d2aa7: This ivar seems totally unecessary to me, and removing it helped patch up a fairly common leak.
details: http://hg.adium.im/adium-1.4/rev/b8864f1d2aa7
revision: 2649:b8864f1d2aa7
author: Stephen Holt <sholt at adium.im>
date: Tue Oct 27 13:19:26 2009 -0400
This ivar seems totally unecessary to me, and removing it helped patch up a fairly common leak.
diffs (50 lines):
diff -r 328d09cb37e8 -r b8864f1d2aa7 Frameworks/Adium Framework/Source/AIChat.m
--- a/Frameworks/Adium Framework/Source/AIChat.m Tue Oct 27 12:56:07 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIChat.m Tue Oct 27 13:19:26 2009 -0400
@@ -90,6 +90,8 @@
[account release];
[self removeAllParticipatingContactsSilently];
[participatingContacts release];
+ [participatingContactsFlags release];
+ [participatingContactsAliases release];
[dateOpened release];
[ignoredListContacts release];
[pendingOutgoingContentObjects release];
diff -r 328d09cb37e8 -r b8864f1d2aa7 Source/KNShelfSplitView.h
--- a/Source/KNShelfSplitView.h Tue Oct 27 12:56:07 2009 -0400
+++ b/Source/KNShelfSplitView.h Tue Oct 27 13:19:26 2009 -0400
@@ -65,7 +65,6 @@
BOOL drawLine;
BOOL shelfOnRight;
- NSString *stringValue;
NSAttributedString *attributedStringValue;
CGFloat stringHeight;
diff -r 328d09cb37e8 -r b8864f1d2aa7 Source/KNShelfSplitView.m
--- a/Source/KNShelfSplitView.m Tue Oct 27 12:56:07 2009 -0400
+++ b/Source/KNShelfSplitView.m Tue Oct 27 13:19:26 2009 -0400
@@ -709,12 +709,9 @@
#pragma mark Status string
- (void)setResizeThumbStringValue:(NSString *)inString
{
- if (![inString isEqualToString:stringValue]) {
- [stringValue release];
- stringValue = [inString copy];
-
+ if (attributedStringValue && ![inString isEqualToString:[attributedStringValue string]]) {
[attributedStringValue release];
- if (stringValue) {
+ if (inString) {
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
[NSParagraphStyle styleWithAlignment:NSLeftTextAlignment
lineBreakMode:NSLineBreakByTruncatingTail], NSParagraphStyleAttributeName,
@@ -722,7 +719,7 @@
nil];
stringHeight = [NSAttributedString stringHeightForAttributes:attributes];
- attributedStringValue = [[NSAttributedString alloc] initWithString:stringValue
+ attributedStringValue = [[NSAttributedString alloc] initWithString:[inString retain]
attributes:attributes];
} else {
attributedStringValue = nil;
More information about the commits
mailing list