adium 3456:0760c326a89c: Leak fix
commits at adium.im
commits at adium.im
Sun Oct 31 17:17:48 UTC 2010
details: http://hg.adium.im/adium/rev/0760c326a89c
revision: 3456:0760c326a89c
author: Evan Schoenberg
date: Sun Oct 31 12:06:41 2010 -0500
Leak fix
(transplanted from 6d98673b86e63f53bdf72dc3798e4f6e11197a79)
Subject: adium 3457:5e2d6d06ebd7: Pseudoleak fix (doesn't actually leak, but Clang says it does)
details: http://hg.adium.im/adium/rev/5e2d6d06ebd7
revision: 3457:5e2d6d06ebd7
author: Evan Schoenberg
date: Sun Oct 31 12:07:04 2010 -0500
Pseudoleak fix (doesn't actually leak, but Clang says it does)
(transplanted from 4c448b069aa7e4f7689c7fee78eb4649aa164154)
Subject: adium 3458:9f8d90dbc739: Leak fix
details: http://hg.adium.im/adium/rev/9f8d90dbc739
revision: 3458:9f8d90dbc739
author: Evan Schoenberg
date: Sun Oct 31 12:07:15 2010 -0500
Leak fix
(transplanted from 3d6b470797623acaa830560aa656dc0d8a57bf22)
Subject: adium 3459:ecaa7aee7623: Note when an AIUserListOutlineView deallocates to demonstrate a leak
details: http://hg.adium.im/adium/rev/ecaa7aee7623
revision: 3459:ecaa7aee7623
author: Evan Schoenberg
date: Sun Oct 31 12:07:56 2010 -0500
Note when an AIUserListOutlineView deallocates to demonstrate a leak
(transplanted from ff2fa0c5c5a36c2d8a62d02b3b5d290bd323d90c)
Subject: adium 3460:bee3b6d292f0: Some more useful debug logging for releases
details: http://hg.adium.im/adium/rev/bee3b6d292f0
revision: 3460:bee3b6d292f0
author: Evan Schoenberg
date: Sun Oct 31 12:08:40 2010 -0500
Some more useful debug logging for releases
(transplanted from 9d0555ae43ffbe2fed888b1633a0cd65164261c1)
Subject: adium 3461:172d18bdb296: Fix a redundant assignment
details: http://hg.adium.im/adium/rev/172d18bdb296
revision: 3461:172d18bdb296
author: Evan Schoenberg
date: Sun Oct 31 12:08:51 2010 -0500
Fix a redundant assignment
(transplanted from d3f79796e343990f17012f262c45643e9e5b229b)
Subject: adium 3462:7d0bea3cf8f4: 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/rev/7d0bea3cf8f4
revision: 3462:7d0bea3cf8f4
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
(transplanted from 6ae83e8b800d1a8ad54dcc0ada38d6b7e3095142)
Subject: adium 3463:3319ef22f8cf: 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/rev/3319ef22f8cf
revision: 3463:3319ef22f8cf
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
(transplanted from 89c2668803f5062ea1544bfd7a5913f34c9021ea)
Subject: adium 3464:9374609f7600: Remove an assignment which just confuses the picture (and throws a clang warning)
details: http://hg.adium.im/adium/rev/9374609f7600
revision: 3464:9374609f7600
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)
(transplanted from 7e3a44a15878a1b2e5b90c4756923abe7eebc833)
Subject: adium 3465:c2d9d9f7e2da: 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/rev/c2d9d9f7e2da
revision: 3465:c2d9d9f7e2da
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
(transplanted from 4656ebc7ca7a4cb72fc00c6310024763fef9abda)
Subject: adium 3466:82a6f3d0c752: Fix a localization problem in which these substituted error messages wouldn't be shown in their localized form
details: http://hg.adium.im/adium/rev/82a6f3d0c752
revision: 3466:82a6f3d0c752
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
(transplanted from 700131f4c0b61682ad7ccebd1a45df52b1353781)
Subject: adium 3467:b6af085c7e82: Leak fix (rare - only when upgrading very old emoticon packs did it happen)
details: http://hg.adium.im/adium/rev/b6af085c7e82
revision: 3467:b6af085c7e82
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)
(transplanted from 5f9d8e5e4a26d956555f08685567bfcd9be72f38)
diffs (327 lines):
diff -r 2b3f52cfb168 -r b6af085c7e82 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 2b3f52cfb168 -r b6af085c7e82 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
@@ -103,6 +103,8 @@
- (void)dealloc
{
+ AILogWithSignature(@"");
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
[tabViewItemImage release]; tabViewItemImage = nil;
diff -r 2b3f52cfb168 -r b6af085c7e82 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
@@ -184,6 +184,7 @@
*/
- (void)dealloc
{
+ AILogWithSignature(@"");
AIListContact *contact = chat.listObject;
[adium.preferenceController unregisterPreferenceObserver:self];
@@ -218,6 +219,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 2b3f52cfb168 -r b6af085c7e82 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
@@ -136,6 +136,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 2b3f52cfb168 -r b6af085c7e82 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>
@@ -722,37 +723,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 2b3f52cfb168 -r b6af085c7e82 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 2b3f52cfb168 -r b6af085c7e82 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 2b3f52cfb168 -r b6af085c7e82 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
@@ -404,9 +404,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 2b3f52cfb168 -r b6af085c7e82 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
@@ -270,8 +270,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 2b3f52cfb168 -r b6af085c7e82 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
@@ -453,6 +453,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"]];
@@ -495,6 +497,8 @@
if (containerActiveChat)
[self setActiveChat:containerActiveChat];
}
+
+ [[AIContactObserverManager sharedManager] endListObjectNotificationsDelay];
}
/*!
diff -r 2b3f52cfb168 -r b6af085c7e82 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
@@ -1408,7 +1408,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 2b3f52cfb168 -r b6af085c7e82 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 2b3f52cfb168 -r b6af085c7e82 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 2b3f52cfb168 -r b6af085c7e82 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 2b3f52cfb168 -r b6af085c7e82 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
@@ -41,10 +41,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 2b3f52cfb168 -r b6af085c7e82 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
@@ -739,7 +739,7 @@
[growlInfo appendAttributedString:defaultExplanation];
- return growlInfo;
+ return [growlInfo autorelease];
}
@end
More information about the commits
mailing list