adium 2777:a55a449072d4: Fixing a few leaks...
commits at adium.im
commits at adium.im
Tue Oct 27 17:57:30 UTC 2009
details: http://hg.adium.im/adium/rev/a55a449072d4
revision: 2777:a55a449072d4
author: Stephen Holt <sholt at adium.im>
date: Tue Oct 27 13:19:00 2009 -0400
Fixing a few leaks...
Subject: adium 2778:dbc1dde294bd: This ivar seems totally unecessary to me, and removing it helped patch up a fairly common leak.
details: http://hg.adium.im/adium/rev/dbc1dde294bd
revision: 2778:dbc1dde294bd
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 862f4e3f05e1 -r dbc1dde294bd Frameworks/Adium Framework/Source/AIChat.m
--- a/Frameworks/Adium Framework/Source/AIChat.m Sun Oct 25 21:21:42 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 862f4e3f05e1 -r dbc1dde294bd Source/KNShelfSplitView.h
--- a/Source/KNShelfSplitView.h Sun Oct 25 21:21:42 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 862f4e3f05e1 -r dbc1dde294bd Source/KNShelfSplitView.m
--- a/Source/KNShelfSplitView.m Sun Oct 25 21:21:42 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