adium-1.4 3139:e1bd04993204: Leak fix
commits at adium.im
commits at adium.im
Wed Oct 27 03:16:19 UTC 2010
details: http://hg.adium.im/adium-1.4/rev/e1bd04993204
revision: 3139:e1bd04993204
author: Evan Schoenberg
date: Tue Oct 26 22:08:15 2010 -0500
Leak fix
Subject: adium-1.4 3140:362ba3f2091b: Fix a theoretical use of null data; however, the Mobile case shouldn't be touched, generally, if groupMobile isn't in use, anyways
details: http://hg.adium.im/adium-1.4/rev/362ba3f2091b
revision: 3140:362ba3f2091b
author: Evan Schoenberg
date: Tue Oct 26 22:08:51 2010 -0500
Fix a theoretical use of null data; however, the Mobile case shouldn't be touched, generally, if groupMobile isn't in use, anyways
Subject: adium-1.4 3141:872930bfd724: Leak fix
details: http://hg.adium.im/adium-1.4/rev/872930bfd724
revision: 3141:872930bfd724
author: Evan Schoenberg
date: Tue Oct 26 22:11:45 2010 -0500
Leak fix
Subject: adium-1.4 3142:86068c96d00c: Every byte counts. Remove unused ivars
details: http://hg.adium.im/adium-1.4/rev/86068c96d00c
revision: 3142:86068c96d00c
author: Evan Schoenberg
date: Tue Oct 26 22:13:14 2010 -0500
Every byte counts. Remove unused ivars
Subject: adium-1.4 3143:815685c156f2: Perform a needed nil check
details: http://hg.adium.im/adium-1.4/rev/815685c156f2
revision: 3143:815685c156f2
author: Evan Schoenberg
date: Tue Oct 26 22:14:54 2010 -0500
Perform a needed nil check
Subject: adium-1.4 3144:3bdef82bac9b: Fix a small leak which occurred each time a link was clicked in a chat
details: http://hg.adium.im/adium-1.4/rev/3bdef82bac9b
revision: 3144:3bdef82bac9b
author: Evan Schoenberg
date: Tue Oct 26 22:15:35 2010 -0500
Fix a small leak which occurred each time a link was clicked in a chat
Subject: adium-1.4 3145:43baccb79d94: Remove initiatialization of an NSMenu which is never used
details: http://hg.adium.im/adium-1.4/rev/43baccb79d94
revision: 3145:43baccb79d94
author: Evan Schoenberg
date: Tue Oct 26 22:16:09 2010 -0500
Remove initiatialization of an NSMenu which is never used
diffs (226 lines):
diff -r 6399148b353f -r 43baccb79d94 Plugins/Purple Service/adiumPurpleRequest.m
--- a/Plugins/Purple Service/adiumPurpleRequest.m Tue Oct 26 22:05:35 2010 -0500
+++ b/Plugins/Purple Service/adiumPurpleRequest.m Tue Oct 26 22:16:09 2010 -0500
@@ -99,7 +99,7 @@
NSString *primaryString = (primary ? [NSString stringWithUTF8String:primary] : nil);
//Ignore purple trying to get an account's password; we'll feed it the password and reconnect if it gets here, somehow.
- if ([primaryString rangeOfString:@"Enter password for "].location != NSNotFound) return [NSNull null];
+ if (primaryString && [primaryString rangeOfString:@"Enter password for "].location != NSNotFound) return [NSNull null];
NSMutableDictionary *infoDict;
NSString *okButtonText = processButtonText([NSString stringWithUTF8String:okText]);
@@ -421,7 +421,7 @@
PurpleRequestFields *fields = [[dict objectForKey:@"fields"] pointerValue];
void *userData = [[dict objectForKey:@"userData"] pointerValue];
- PurpleRequestFieldsCb cb;
+ PurpleRequestFieldsCb cb = NULL;
switch (returnCode) {
case AIPasswordPromptOKReturn:
@@ -438,7 +438,8 @@
break;
}
- cb(userData, fields);
+ if (cb)
+ cb(userData, fields);
}
@end
diff -r 6399148b353f -r 43baccb79d94 Plugins/WebKit Message View/AIWebKitDelegate.m
--- a/Plugins/WebKit Message View/AIWebKitDelegate.m Tue Oct 26 22:05:35 2010 -0500
+++ b/Plugins/WebKit Message View/AIWebKitDelegate.m Tue Oct 26 22:16:09 2010 -0500
@@ -92,21 +92,26 @@
NSInteger actionKey = [[actionInformation objectForKey: WebActionNavigationTypeKey] integerValue];
if (actionKey == WebNavigationTypeOther) {
[listener use];
- } else if ([((NSString *)LSCopyDefaultHandlerForURLScheme((CFStringRef)request.URL.scheme)).lowercaseString isEqualToString:@"com.adiumx.adiumx"]) {
- // We're the default for this URL, let's open it ourself.
- [[NSNotificationCenter defaultCenter] postNotificationName:@"AIURLHandleNotification" object:request.URL.absoluteString];
- [listener ignore];
- } else {
- NSURL *url = [actionInformation objectForKey:WebActionOriginalURLKey];
-
- //Ignore file URLs, but open anything else
- if (![url isFileURL]) {
- [[NSWorkspace sharedWorkspace] openURL:url];
+ } else {
+ NSString *defaultHandler = [((NSString *)LSCopyDefaultHandlerForURLScheme((CFStringRef)request.URL.scheme)) autorelease];
+ if ([defaultHandler.lowercaseString isEqualToString:@"com.adiumx.adiumx"]) {
+ // We're the default for this URL, let's open it ourself.
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"AIURLHandleNotification" object:request.URL.absoluteString];
+
+ [listener ignore];
+
+ } else {
+ NSURL *url = [actionInformation objectForKey:WebActionOriginalURLKey];
+
+ //Ignore file URLs, but open anything else
+ if (![url isFileURL]) {
+ [[NSWorkspace sharedWorkspace] openURL:url];
+ }
+
+ [listener ignore];
}
-
- [listener ignore];
- }
+ }
}
/*!
diff -r 6399148b353f -r 43baccb79d94 Source/AIContactController.h
--- a/Source/AIContactController.h Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/AIContactController.h Tue Oct 26 22:16:09 2010 -0500
@@ -17,7 +17,7 @@
#import <Adium/AIContactControllerProtocol.h>
#import "AIContactObserverManager.h"
- at class AISortController, AdiumAuthorization, AIContactHidingController, AIContactObserverManager;
+ at class AISortController, AIContactHidingController, AIContactObserverManager;
@interface AIContactController : NSObject <AIContactController, AIListObjectObserver> {
@private
@@ -33,14 +33,11 @@
BOOL useContactListGroups;
NSMenuItem *menuItem_showGroups;
BOOL useOfflineGroup;
- NSMenuItem *menuItem_useOfflineGroup;
//Detached Contact Lists
NSMutableArray *contactLists;
- //Authorization
- AdiumAuthorization *adiumAuthorization;
-
+ //Authorization
AIContactObserverManager *contactPropertiesObserverManager;
}
diff -r 6399148b353f -r 43baccb79d94 Source/AIContactSortSelectionPlugin.m
--- a/Source/AIContactSortSelectionPlugin.m Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/AIContactSortSelectionPlugin.m Tue Oct 26 22:16:09 2010 -0500
@@ -113,11 +113,6 @@
*/
- (void)_configureSortSelectionMenuItems
{
- NSMenu *sortSelectionMenu;
-
- //Create the menu
- sortSelectionMenu = [[[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@""] autorelease];
-
//Add each sort controller
for (AISortController *controller in [AISortController availableSortControllers]) {
NSMenuItem *menuItem;
diff -r 6399148b353f -r 43baccb79d94 Source/AIContentController.h
--- a/Source/AIContentController.h Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/AIContentController.h Tue Oct 26 22:16:09 2010 -0500
@@ -28,7 +28,6 @@
AdiumMessageEvents *adiumMessageEvents;
id<AdiumMessageEncryptor> adiumEncryptor;
- NSMutableDictionary *defaultFormattingAttributes;
NSMutableSet *objectsBeingReceived;
}
diff -r 6399148b353f -r 43baccb79d94 Source/AIEmoticonController.h
--- a/Source/AIEmoticonController.h Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/AIEmoticonController.h Tue Oct 26 22:16:09 2010 -0500
@@ -30,8 +30,6 @@
NSCharacterSet *_emoticonHintCharacterSet;
NSCharacterSet *_emoticonStartCharacterSet;
NSMutableDictionary *_emoticonIndexDict;
-
- BOOL serviceAppropriateEmoticons;
}
@end
diff -r 6399148b353f -r 43baccb79d94 Source/AIInterfaceController.h
--- a/Source/AIInterfaceController.h Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/AIInterfaceController.h Tue Oct 26 22:16:09 2010 -0500
@@ -52,10 +52,6 @@
NSMutableAttributedString *tooltipBody;
NSMutableAttributedString *tooltipTitle;
NSImage *tooltipImage;
-
-
- NSString *errorTitle;
- NSString *errorDesc;
BOOL closeMenuConfiguredForChat;
diff -r 6399148b353f -r 43baccb79d94 Source/AIMenuController.h
--- a/Source/AIMenuController.h Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/AIMenuController.h Tue Oct 26 22:16:09 2010 -0500
@@ -160,9 +160,7 @@
NSMenu *textViewContextualMenu;
- NSMutableArray *locationArray;
- BOOL isTracking;
-
+ NSMutableArray *locationArray;
}
@end
diff -r 6399148b353f -r 43baccb79d94 Source/AIStatusController.h
--- a/Source/AIStatusController.h Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/AIStatusController.h Tue Oct 26 22:16:09 2010 -0500
@@ -34,7 +34,6 @@
NSMutableSet *builtInStatusTypes[STATUS_TYPES_COUNT];
NSMutableSet *accountsToConnect;
- BOOL isProcessingGlobalChange;
//State menu support
NSMutableArray *stateMenuPluginsArray;
diff -r 6399148b353f -r 43baccb79d94 Source/ESGlobalEventsPreferences.m
--- a/Source/ESGlobalEventsPreferences.m Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/ESGlobalEventsPreferences.m Tue Oct 26 22:16:09 2010 -0500
@@ -342,7 +342,7 @@
- (NSArray *)renamePreset:(NSDictionary *)preset toName:(NSString *)newName inPresets:(NSArray *)presets renamedPreset:(id *)renamedPreset
{
NSString *oldPresetName = [preset objectForKey:@"Name"];
- NSMutableDictionary *newPreset = [preset mutableCopy];
+ NSMutableDictionary *newPreset = [[preset mutableCopy] autorelease];
NSString *localizedCurrentName = [self _localizedTitle:[adium.preferenceController preferenceForKey:KEY_ACTIVE_EVENT_SET
group:PREF_GROUP_EVENT_PRESETS]];
[newPreset setObject:newName
diff -r 6399148b353f -r 43baccb79d94 Source/ESStatusSort.m
--- a/Source/ESStatusSort.m Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/ESStatusSort.m Tue Oct 26 22:16:09 2010 -0500
@@ -621,6 +621,10 @@
if (groupMobile) {
mobile[0] = [objectA isMobile];
mobile[1] = [objectB isMobile];
+ } else {
+ /* If mobile appears in the sort list, treat the two items as identical */
+ mobile[0] = FALSE;
+ mobile[1] = FALSE;
}
for (objectCounter = 0; objectCounter < 2; objectCounter++) {
diff -r 6399148b353f -r 43baccb79d94 Source/GBApplescriptFiltersPlugin.m
--- a/Source/GBApplescriptFiltersPlugin.m Tue Oct 26 22:05:35 2010 -0500
+++ b/Source/GBApplescriptFiltersPlugin.m Tue Oct 26 22:16:09 2010 -0500
@@ -318,7 +318,7 @@
NSDictionary *appendDict;
NSString *lastSet = nil;
NSString *set;
- NSInteger indentationLevel;
+ NSInteger indentationLevel;
for (appendDict in scripts) {
NSString *title;
@@ -359,6 +359,8 @@
if ([item respondsToSelector:@selector(setIndentationLevel:)]) [item setIndentationLevel:indentationLevel];
[menu addItem:item];
}
+
+ [lastSet release];
}
/*!
More information about the commits
mailing list