adium/adium

aa11115be326
Parents 626cff7a42c6
Children f68138d15637
Another bunch of leak fixes, found by the static analyzer.
--- a/Plugins/Bonjour/libezv/Classes/EKEzvIncomingFileTransfer.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Plugins/Bonjour/libezv/Classes/EKEzvIncomingFileTransfer.m Sun Jan 29 01:41:57 2012 +0100
@@ -295,7 +295,7 @@
// create the connection with the request
// and start loading the data
- NSURLDownload *theDownload = [[NSURLDownload alloc] initWithRequest:theRequest delegate:self];
+ NSURLDownload *theDownload = [[[NSURLDownload alloc] initWithRequest:theRequest delegate:self] autorelease];
if (theDownload) {
[currentDownloads addObject:theDownload];
// set the destination file now
--- a/Plugins/Twitter Plugin/AILaconicaAccount.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Plugins/Twitter Plugin/AILaconicaAccount.m Sun Jan 29 01:41:57 2012 +0100
@@ -153,9 +153,9 @@
NSString *path = [[@"/" stringByAppendingPathComponent:self.apiPath]
stringByAppendingPathComponent:@"statusnet/config.xml"];
- NSURL *url = [[NSURL alloc] initWithScheme:(self.useSSL ? @"https" : @"http")
- host:self.host
- path:path];
+ NSURL *url = [[[NSURL alloc] initWithScheme:(self.useSSL ? @"https" : @"http")
+ host:self.host
+ path:path] autorelease];
NSURLRequest *configRequest = [NSURLRequest requestWithURL:url];
@@ -198,6 +198,7 @@
AILogWithSignature(@"Failed fetching StatusNet server config for %@: %d %@", self.host, [err code], [err localizedDescription]);
[configData release]; configData = nil;
+ [config release];
[textLimitConfigDownload release]; textLimitConfigDownload = nil;
}
}
--- a/Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Plugins/WebKit Message View/AIWebKitMessageViewPlugin.m Sun Jan 29 01:41:57 2012 +0100
@@ -308,7 +308,7 @@
if (![[adium.preferenceController preferenceForKey:@"Adium 1.4:Updated Preferences"
group:PREF_GROUP_WEBKIT_REGULAR_MESSAGE_DISPLAY] boolValue]) {
NSDictionary *dict = [adium.preferenceController preferencesForGroup:PREF_GROUP_WEBKIT_REGULAR_MESSAGE_DISPLAY];
- NSMutableDictionary *newDict = [dict mutableCopy];
+ NSMutableDictionary *newDict = [[dict mutableCopy] autorelease];
NSMutableSet *keysToRemove = [NSMutableSet set];
NSDictionary *conversionDict =
--- a/Source/AIDockIconSelectionSheet.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Source/AIDockIconSelectionSheet.m Sun Jan 29 01:41:57 2012 +0100
@@ -119,7 +119,7 @@
- (void)xtrasChanged:(NSNotification *)notification
{
if (!notification || [[notification object] caseInsensitiveCompare:@"AdiumIcon"] == NSOrderedSame) {
- [self setIconsData:[[NSMutableArray alloc] init]];
+ [self setIconsData:[NSMutableArray array]];
NSMutableArray *dockIcons = [[NSMutableArray alloc] init];
// Fetch the pack previews
--- a/Source/AIEmoticonController.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Source/AIEmoticonController.m Sun Jan 29 01:41:57 2012 +0100
@@ -292,7 +292,7 @@
[tempSet formUnionWithCharacterSet:[NSCharacterSet symbolCharacterSet]];
//remove any characters *in* the replacement string from the trimming set
[tempSet removeCharactersInString:replacementString];
- [endingSetDict setObject:[tempSet copyImmutable] forKey:replacementString];
+ [endingSetDict setObject:[[tempSet copyImmutable] autorelease] forKey:replacementString];
[tempSet release];
endingTrimSet = [endingSetDict objectForKey:replacementString];
}
--- a/Source/AIXMLChatlogConverter.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Source/AIXMLChatlogConverter.m Sun Jan 29 01:41:57 2012 +0100
@@ -192,7 +192,7 @@
for (AIAccount *account in adium.accountController.accounts) {
if ([[account.UID compactedString] isEqualToString:[mySN compactedString]] &&
[account.service.serviceID isEqualToString:service]) {
- myDisplayName = [account.displayName retain];
+ myDisplayName = [[account.displayName retain] autorelease];
break;
}
}
--- a/Source/BGEmoticonMenuPlugin.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Source/BGEmoticonMenuPlugin.m Sun Jan 29 01:41:57 2012 +0100
@@ -158,15 +158,15 @@
//Register our toolbar item
button = [[[MVMenuButton alloc] initWithFrame:NSMakeRect(0,0,32,32)] autorelease];
[button setImage:[NSImage imageNamed:@"emoticon32" forClass:[self class] loadLazily:YES]];
- toolbarItem = [[AIToolbarUtilities toolbarItemWithIdentifier:TOOLBAR_EMOTICON_IDENTIFIER
- label:TITLE_EMOTICON
- paletteLabel:TITLE_INSERT_EMOTICON
- toolTip:TOOLTIP_INSERT_EMOTICON
- target:self
- settingSelector:@selector(setView:)
- itemContent:button
- action:@selector(insertEmoticon:)
- menu:nil] retain];
+ toolbarItem = [AIToolbarUtilities toolbarItemWithIdentifier:TOOLBAR_EMOTICON_IDENTIFIER
+ label:TITLE_EMOTICON
+ paletteLabel:TITLE_INSERT_EMOTICON
+ toolTip:TOOLTIP_INSERT_EMOTICON
+ target:self
+ settingSelector:@selector(setView:)
+ itemContent:button
+ action:@selector(insertEmoticon:)
+ menu:nil];
[toolbarItem setMinSize:NSMakeSize(32,32)];
[toolbarItem setMaxSize:NSMakeSize(32,32)];
[button setToolbarItem:toolbarItem];
--- a/Source/ESAddressBookIntegrationAdvancedPreferences.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Source/ESAddressBookIntegrationAdvancedPreferences.m Sun Jan 29 01:41:57 2012 +0100
@@ -420,7 +420,7 @@
}
}
- [tokens addObject:[[string substringWithRange:NSMakeRange(start, i - start)] mutableCopy]];
+ [tokens addObject:[[[string substringWithRange:NSMakeRange(start, i - start)] mutableCopy] autorelease]];
}
return tokens;
--- a/Source/ESGlobalEventsPreferences.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Source/ESGlobalEventsPreferences.m Sun Jan 29 01:41:57 2012 +0100
@@ -766,6 +766,7 @@
representedObject:soundSet];
if ([[menuItem title] isEqualToString:NONE]) {
+ [noneMenuItem release];
noneMenuItem = menuItem;
} else {
--- a/Source/XtrasInstaller.m Sun Jan 29 00:59:22 2012 +0100
+++ b/Source/XtrasInstaller.m Sun Jan 29 01:41:57 2012 +0100
@@ -103,7 +103,7 @@
AILogWithSignature(@"Downloading %@", urlToDownload);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:urlToDownload];
[request setHTTPShouldHandleCookies:NO];
- self.download = [[NSURLDownload alloc] initWithRequest:request delegate:self];
+ self.download = [[[NSURLDownload alloc] initWithRequest:request delegate:self] autorelease];
// [download setDestination:dest allowOverwrite:YES];
[urlToDownload release];