adium-1.4 3186:6d98673b86e6: Leak fix
commits at adium.im
commits at adium.im
Sun Oct 31 17:16:10 UTC 2010
details: http://hg.adium.im/adium-1.4/rev/6d98673b86e6
revision: 3186:6d98673b86e6
author: Evan Schoenberg
date: Sun Oct 31 12:06:41 2010 -0500
Leak fix
Subject: adium-1.4 3187:4c448b069aa7: Pseudoleak fix (doesn't actually leak, but Clang says it does)
details: http://hg.adium.im/adium-1.4/rev/4c448b069aa7
revision: 3187:4c448b069aa7
author: Evan Schoenberg
date: Sun Oct 31 12:07:04 2010 -0500
Pseudoleak fix (doesn't actually leak, but Clang says it does)
Subject: adium-1.4 3188:3d6b47079762: Leak fix
details: http://hg.adium.im/adium-1.4/rev/3d6b47079762
revision: 3188:3d6b47079762
author: Evan Schoenberg
date: Sun Oct 31 12:07:15 2010 -0500
Leak fix
Subject: adium-1.4 3189:b04543b335af: Fix a clang warning about a potentially uninitialized variable being used
details: http://hg.adium.im/adium-1.4/rev/b04543b335af
revision: 3189:b04543b335af
author: Evan Schoenberg
date: Sun Oct 31 12:07:32 2010 -0500
Fix a clang warning about a potentially uninitialized variable being used
Subject: adium-1.4 3190:ff2fa0c5c5a3: Note when an AIUserListOutlineView deallocates to demonstrate a leak
details: http://hg.adium.im/adium-1.4/rev/ff2fa0c5c5a3
revision: 3190:ff2fa0c5c5a3
author: Evan Schoenberg
date: Sun Oct 31 12:07:56 2010 -0500
Note when an AIUserListOutlineView deallocates to demonstrate a leak
Subject: adium-1.4 3191:9d0555ae43ff: Some more useful debug logging for releases
details: http://hg.adium.im/adium-1.4/rev/9d0555ae43ff
revision: 3191:9d0555ae43ff
author: Evan Schoenberg
date: Sun Oct 31 12:08:40 2010 -0500
Some more useful debug logging for releases
Subject: adium-1.4 3192:d3f79796e343: Fix a redundant assignment
details: http://hg.adium.im/adium-1.4/rev/d3f79796e343
revision: 3192:d3f79796e343
author: Evan Schoenberg
date: Sun Oct 31 12:08:51 2010 -0500
Fix a redundant assignment
Subject: adium-1.4 3193:6ae83e8b800d: Small optimization: use delayListObjectNotifications as we restore chats. This provides a tiny speed boost if a bunch of chats are being restored
details: http://hg.adium.im/adium-1.4/rev/6ae83e8b800d
revision: 3193:6ae83e8b800d
author: Evan Schoenberg
date: Sun Oct 31 12:11:29 2010 -0500
Small optimization: use delayListObjectNotifications as we restore chats. This provides a tiny speed boost if a bunch of chats are being restored
Subject: adium-1.4 3194:89c2668803f5: Use delayListObjectNotifications as Adium finishes launching; this can provide a significant launch time improvement if plugins are doing a lot at that time, e.g. the address book plugin initializing
details: http://hg.adium.im/adium-1.4/rev/89c2668803f5
revision: 3194:89c2668803f5
author: Evan Schoenberg
date: Sun Oct 31 12:12:05 2010 -0500
Use delayListObjectNotifications as Adium finishes launching; this can provide a significant launch time improvement if plugins are doing a lot at that time, e.g. the address book plugin initializing
Subject: adium-1.4 3195:7e3a44a15878: Remove an assignment which just confuses the picture (and throws a clang warning)
details: http://hg.adium.im/adium-1.4/rev/7e3a44a15878
revision: 3195:7e3a44a15878
author: Evan Schoenberg
date: Sun Oct 31 12:12:34 2010 -0500
Remove an assignment which just confuses the picture (and throws a clang warning)
Subject: adium-1.4 3196:4656ebc7ca7a: Fix the contents of the Send Message contact alert action's accounts menu in certain settings; the iterated variable wasn't even being checked
details: http://hg.adium.im/adium-1.4/rev/4656ebc7ca7a
revision: 3196:4656ebc7ca7a
author: Evan Schoenberg
date: Sun Oct 31 12:13:20 2010 -0500
Fix the contents of the Send Message contact alert action's accounts menu in certain settings; the iterated variable wasn't even being checked
Subject: adium-1.4 3197:700131f4c0b6: Fix a localization problem in which these substituted error messages wouldn't be shown in their localized form
details: http://hg.adium.im/adium-1.4/rev/700131f4c0b6
revision: 3197:700131f4c0b6
author: Evan Schoenberg
date: Sun Oct 31 12:13:39 2010 -0500
Fix a localization problem in which these substituted error messages wouldn't be shown in their localized form
Subject: adium-1.4 3198:5f9d8e5e4a26: Leak fix (rare - only when upgrading very old emoticon packs did it happen)
details: http://hg.adium.im/adium-1.4/rev/5f9d8e5e4a26
revision: 3198:5f9d8e5e4a26
author: Evan Schoenberg
date: Sun Oct 31 12:15:58 2010 -0500
Leak fix (rare - only when upgrading very old emoticon packs did it happen)
diffs (339 lines):
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Frameworks/Adium Framework/Source/AIEmoticonPack.m
--- a/Frameworks/Adium Framework/Source/AIEmoticonPack.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Frameworks/Adium Framework/Source/AIEmoticonPack.m Sun Oct 31 12:15:58 2010 -0500
@@ -480,8 +480,8 @@
//Add to our emoticon plist
[emoticonDict setObject:[NSDictionary dictionaryWithObjectsAndKeys:
- emoticonStrings, EMOTICON_EQUIVALENTS,
- emoticonName, EMOTICON_NAME, nil]
+ emoticonStrings, EMOTICON_EQUIVALENTS,
+ emoticonName, EMOTICON_NAME, nil]
forKey:newImageName];
}
}
@@ -528,7 +528,7 @@
if (equivString) {
//Convert the text file into an array of strings
equivString = [self _stringWithMacEndlines:equivString];
- textEquivalents = [[equivString componentsSeparatedByString:@"\r"] retain];
+ textEquivalents = [equivString componentsSeparatedByString:@"\r"];
}
return textEquivalents;
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Plugins/Dual Window Interface/AIMessageTabViewItem.m
--- a/Plugins/Dual Window Interface/AIMessageTabViewItem.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Plugins/Dual Window Interface/AIMessageTabViewItem.m Sun Oct 31 12:15:58 2010 -0500
@@ -100,6 +100,8 @@
- (void)dealloc
{
+ AILogWithSignature(@"");
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
[tabViewItemImage release]; tabViewItemImage = nil;
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Plugins/Dual Window Interface/AIMessageViewController.m
--- a/Plugins/Dual Window Interface/AIMessageViewController.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Plugins/Dual Window Interface/AIMessageViewController.m Sun Oct 31 12:15:58 2010 -0500
@@ -180,6 +180,7 @@
*/
- (void)dealloc
{
+ AILogWithSignature(@"");
AIListContact *contact = chat.listObject;
[adium.preferenceController unregisterPreferenceObserver:self];
@@ -214,6 +215,9 @@
//Release the views for which we are responsible (because we loaded them via -[NSBundle loadNibNamed:owner])
[nibrootView_messageView release];
[nibrootView_shelfVew release];
+ AILogWithSignature(@"Releasing %@ (%@, %i)", nibrootView_userList, [nibrootView_userList superview], [nibrootView_userList retainCount]);
+ AILogWithSignature(@"scrollView_userList %@ (%@, %i)", scrollView_userList, [scrollView_userList superview], [scrollView_userList retainCount]);
+
[nibrootView_userList release];
//Release the hidden user list view
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Plugins/Dual Window Interface/AIMessageWindowController.m
--- a/Plugins/Dual Window Interface/AIMessageWindowController.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Plugins/Dual Window Interface/AIMessageWindowController.m Sun Oct 31 12:15:58 2010 -0500
@@ -131,6 +131,8 @@
//dealloc
- (void)dealloc
{
+ AILogWithSignature(@"");
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
/* Ensure our window is quite clear we have no desire to ever hear from it again. sendEvent: with a flags changed
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Plugins/Purple Service/SLPurpleCocoaAdapter.m
--- a/Plugins/Purple Service/SLPurpleCocoaAdapter.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Plugins/Purple Service/SLPurpleCocoaAdapter.m Sun Oct 31 12:15:58 2010 -0500
@@ -33,6 +33,7 @@
#import <Adium/AIListContact.h>
#import <Adium/AIContactObserverManager.h>
#import <Adium/AIUserIcons.h>
+#import <Adium/AIContactObserverManager.h>
#import <AIUtilities/AIImageAdditions.h>
#import <CoreFoundation/CoreFoundation.h>
@@ -696,37 +697,41 @@
return NULL;
}
- } else if ([primaryString rangeOfString: @"did not get sent"].location != NSNotFound) {
+ }
+
+ if ([primaryString rangeOfString: @"did not get sent"].location != NSNotFound) {
//Oscar send error
//This may not ever occur as of libpurple 2.4.0; I can't find the phrase 'did not get sent' in any of the code. -evands
NSString *targetUserName = [[[[primaryString componentsSeparatedByString:@" message to "] objectAtIndex:1] componentsSeparatedByString:@" did not get "] objectAtIndex:0];
errorMessage = [NSString stringWithFormat:AILocalizedString(@"Your message to %@ did not get sent",nil),targetUserName];
- if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Rate")]].location != NSNotFound) {
- description = AILocalizedString(@"You are sending messages too quickly; wait a moment and try again.",nil);
- } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Service unavailable")]].location != NSNotFound ||
- [secondaryString rangeOfString:[NSString stringWithUTF8String:_("Not logged in")]].location != NSNotFound) {
- description = AILocalizedString(@"Connection error.",nil);
-
- } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Refused by client")]].location != NSNotFound) {
- description = AILocalizedString(@"Your message was refused by the other user.",nil);
-
- } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Reply too big")]].location != NSNotFound) {
- description = AILocalizedString(@"Your message was too big.",nil);
-
- } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("In local permit/deny")]].location != NSNotFound) {
- description = AILocalizedString(@"The other user is in your deny list.",nil);
-
- } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Too evil")]].location != NSNotFound) {
- description = AILocalizedString(@"Warning level is too high.",nil);
-
- } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("User temporarily unavailable")]].location != NSNotFound) {
- description = AILocalizedString(@"The other user is temporarily unavailable.",nil);
-
- } else {
+ if (secondaryString) {
+ if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Rate")]].location != NSNotFound) {
+ description = AILocalizedString(@"You are sending messages too quickly; wait a moment and try again.",nil);
+ } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Service unavailable")]].location != NSNotFound ||
+ [secondaryString rangeOfString:[NSString stringWithUTF8String:_("Not logged in")]].location != NSNotFound) {
+ description = AILocalizedString(@"Connection error.",nil);
+
+ } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Refused by client")]].location != NSNotFound) {
+ description = AILocalizedString(@"Your message was refused by the other user.",nil);
+
+ } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Reply too big")]].location != NSNotFound) {
+ description = AILocalizedString(@"Your message was too big.",nil);
+
+ } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("In local permit/deny")]].location != NSNotFound) {
+ description = AILocalizedString(@"The other user is in your deny list.",nil);
+
+ } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("Too evil")]].location != NSNotFound) {
+ description = AILocalizedString(@"Warning level is too high.",nil);
+
+ } else if ([secondaryString rangeOfString:[NSString stringWithUTF8String:_("User temporarily unavailable")]].location != NSNotFound) {
+ description = AILocalizedString(@"The other user is temporarily unavailable.",nil);
+ }
+ }
+
+ if (!description)
description = AILocalizedString(@"No reason was given.",nil);
- }
}
//If we didn't grab a translated version, at least display the English version Purple supplied
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Plugins/Send Message Contact Alert/ESSendMessageAlertDetailPane.m
--- a/Plugins/Send Message Contact Alert/ESSendMessageAlertDetailPane.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Plugins/Send Message Contact Alert/ESSendMessageAlertDetailPane.m Sun Oct 31 12:15:58 2010 -0500
@@ -194,7 +194,7 @@
enumerator = [((AIMetaContact *)toContact).uniqueContainedObjects objectEnumerator];
while ((listContact = [enumerator nextObject]) && !shouldInclude) {
- shouldInclude = [accountServiceClass isEqualToString:toContact.service.serviceClass];
+ shouldInclude = [accountServiceClass isEqualToString:listContact.service.serviceClass];
}
} else {
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m
--- a/Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m Sun Oct 31 12:15:58 2010 -0500
@@ -206,17 +206,22 @@
[*thisStyle retain];
}
- NSDictionary *fileAttrs = [[NSFileManager defaultManager] fileAttributesAtPath:[[*thisStyle bundle] bundlePath]
- traverseLink:YES];
- NSDate *modDate = [fileAttrs objectForKey:NSFileModificationDate];
- if (lastStyleLoadDate && [modDate timeIntervalSinceDate:lastStyleLoadDate] > 0) {
- [currentGroupStyle reloadStyle];
- [currentRegularStyle reloadStyle];
+ if (thisStyle) {
+ NSDictionary *fileAttrs = [[NSFileManager defaultManager] fileAttributesAtPath:[[*thisStyle bundle] bundlePath]
+ traverseLink:YES];
+ NSDate *modDate = [fileAttrs objectForKey:NSFileModificationDate];
+ if (lastStyleLoadDate && [modDate timeIntervalSinceDate:lastStyleLoadDate] > 0) {
+ [currentGroupStyle reloadStyle];
+ [currentRegularStyle reloadStyle];
+ }
+ [lastStyleLoadDate release];
+ lastStyleLoadDate = [[NSDate date] retain];
+ } else {
+ [lastStyleLoadDate release];
+ lastStyleLoadDate = nil;
}
- [lastStyleLoadDate release];
- lastStyleLoadDate = [[NSDate date] retain];
- return *thisStyle;
+ return (thisStyle ? *thisStyle : nil);
}
- (void) resetStylesForType:(AIWebkitStyleType)styleType
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
--- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Sun Oct 31 12:15:58 2010 -0500
@@ -393,9 +393,8 @@
{
NSMutableString *mutableTemplate = [[self templateForContent:content similar:contentIsSimilar] mutableCopy];
- if (mutableTemplate) {
- mutableTemplate = [self fillKeywords:mutableTemplate forContent:content similar:contentIsSimilar];
- }
+ if (mutableTemplate)
+ [self fillKeywords:mutableTemplate forContent:content similar:contentIsSimilar];
return [mutableTemplate autorelease];
}
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/AIAdium.m
--- a/Source/AIAdium.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/AIAdium.m Sun Oct 31 12:15:58 2010 -0500
@@ -254,8 +254,10 @@
[connection setRootObject:self];
[connection registerName:@"com.adiumX.adiumX"];
+ [[AIContactObserverManager sharedManager] delayListObjectNotifications];
[[NSNotificationCenter defaultCenter] postNotificationName:AIApplicationDidFinishLoadingNotification object:nil];
[[NSDistributedNotificationCenter defaultCenter] postNotificationName:AIApplicationDidFinishLoadingNotification object:nil];
+ [[AIContactObserverManager sharedManager] endListObjectNotificationsDelay];
[pool release];
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/AIInterfaceController.m
--- a/Source/AIInterfaceController.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/AIInterfaceController.m Sun Oct 31 12:15:58 2010 -0500
@@ -434,6 +434,8 @@
if (!savedData)
return;
+ [[AIContactObserverManager sharedManager] delayListObjectNotifications];
+
for (NSDictionary *dict in [NSKeyedUnarchiver unarchiveObjectWithData:savedData]) {
AIMessageWindowController *windowController = [self openContainerWithID:[dict objectForKey:@"ID"]
name:[dict objectForKey:@"Name"]];
@@ -476,6 +478,8 @@
if (containerActiveChat)
[self setActiveChat:containerActiveChat];
}
+
+ [[AIContactObserverManager sharedManager] endListObjectNotificationsDelay];
}
/*!
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/AILoggerPlugin.m
--- a/Source/AILoggerPlugin.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/AILoggerPlugin.m Sun Oct 31 12:15:58 2010 -0500
@@ -1379,7 +1379,7 @@
error:NULL];
for (NSString *fromName in fromNames) {
- AILogFromGroup *fromGroup = fromGroup = [[AILogFromGroup alloc] initWithPath:fromName fromUID:fromName serviceClass:nil];
+ AILogFromGroup *fromGroup = [[AILogFromGroup alloc] initWithPath:fromName fromUID:fromName serviceClass:nil];
//Walk through every 'to' group
for (AILogToGroup *toGroup in [fromGroup toGroupArray]) {
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/AIMessageWindow.m
--- a/Source/AIMessageWindow.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/AIMessageWindow.m Sun Oct 31 12:15:58 2010 -0500
@@ -34,6 +34,13 @@
uniqueID:[NSNumber numberWithUnsignedInteger:[self hash]]] autorelease];
}
+- (void)dealloc
+{
+ AILogWithSignature(@"");
+
+ [super dealloc];
+}
+
- (NSArray *)chats
{
return [(AIMessageWindowController *)[self windowController] containedChats];
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/AIUserListOutlineView.m
--- a/Source/AIUserListOutlineView.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/AIUserListOutlineView.m Sun Oct 31 12:15:58 2010 -0500
@@ -19,4 +19,10 @@
return NO;
}
+- (void)dealloc
+{
+ AILogWithSignature(@"");
+ [super dealloc];
+}
+
@end
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/ESAccountEvents.m
--- a/Source/ESAccountEvents.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/ESAccountEvents.m Sun Oct 31 12:15:58 2010 -0500
@@ -181,7 +181,7 @@
forChat:(AIChat *)chat
withCount:(NSUInteger)count
{
- NSString *format;
+ NSString *format = nil;
if ([eventID isEqualToString:ACCOUNT_CONNECTED]) {
format = AILocalizedString(@"%u accounts connected",nil);
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/ESAnnouncerAbstractDetailPane.m
--- a/Source/ESAnnouncerAbstractDetailPane.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/ESAnnouncerAbstractDetailPane.m Sun Oct 31 12:15:58 2010 -0500
@@ -213,7 +213,7 @@
[voicesMenu addItem:menuItem];
}
- return voicesMenu;
+ return [voicesMenu autorelease];
}
/*!
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/ESStatusPreferencesPlugin.m
--- a/Source/ESStatusPreferencesPlugin.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/ESStatusPreferencesPlugin.m Sun Oct 31 12:15:58 2010 -0500
@@ -37,10 +37,10 @@
advancedPreferences = [[ESStatusAdvancedPreferences preferencePaneForPlugin:self] retain];
//Add our menu item
- menuItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[AILocalizedString(@"Edit Status Menu",nil) stringByAppendingEllipsis]
- target:self
- action:@selector(showStatusPreferences:)
- keyEquivalent:@""];
+ menuItem = [[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[AILocalizedString(@"Edit Status Menu",nil) stringByAppendingEllipsis]
+ target:self
+ action:@selector(showStatusPreferences:)
+ keyEquivalent:@""] autorelease];
[adium.menuController addMenuItem:menuItem toLocation:LOC_Status_Additions];
//Register defaults
diff -r 63c41dfda8f3 -r 5f9d8e5e4a26 Source/NEHGrowlPlugin.m
--- a/Source/NEHGrowlPlugin.m Sat Oct 30 20:10:03 2010 -0500
+++ b/Source/NEHGrowlPlugin.m Sun Oct 31 12:15:58 2010 -0500
@@ -735,7 +735,7 @@
[growlInfo appendAttributedString:defaultExplanation];
- return growlInfo;
+ return [growlInfo autorelease];
}
@end
More information about the commits
mailing list