adium 5596:51f0fe2d35a2: Fix some memory issues.

commits at adium.im commits at adium.im
Wed Jun 26 03:16:07 UTC 2013


details:	http://hg.adium.im/adium/rev/51f0fe2d35a2
revision:	5596:51f0fe2d35a2
branch:		(none)
author:		Frank Dowsett <wixardy at adium.im>
date:		Tue Jun 25 22:50:17 2013 -0400

Fix some memory issues.
Subject: adium 5597:d95e88e9cbfa: Don't try to strip things like Growl.framework; it won't work because it's code signed.

details:	http://hg.adium.im/adium/rev/d95e88e9cbfa
revision:	5597:d95e88e9cbfa
branch:		(none)
author:		Frank Dowsett <wixardy at adium.im>
date:		Tue Jun 25 23:15:09 2013 -0400

Don't try to strip things like Growl.framework; it won't work because it's code signed.

diffs (109 lines):

diff -r 551c610ece99 -r d95e88e9cbfa Plugins/Link Management/SHAutoValidatingTextView.m
--- a/Plugins/Link Management/SHAutoValidatingTextView.m	Tue Jun 25 10:04:55 2013 +0200
+++ b/Plugins/Link Management/SHAutoValidatingTextView.m	Tue Jun 25 23:15:09 2013 -0400
@@ -126,7 +126,7 @@
 		escapedURLString = nil;
 	}
 
-	return (escapedURLString ? (__bridge NSString *)escapedURLString : linkURL);
+	return (escapedURLString ? (__bridge_transfer NSString *)escapedURLString : linkURL);
 }
 
 @end
diff -r 551c610ece99 -r d95e88e9cbfa Source/AIAppearancePreferences.m
--- a/Source/AIAppearancePreferences.m	Tue Jun 25 10:04:55 2013 +0200
+++ b/Source/AIAppearancePreferences.m	Tue Jun 25 23:15:09 2013 -0400
@@ -138,6 +138,9 @@
 	if (!type || UTTypeEqual(type, CFSTR("com.adiumx.menubaricons"))) {
 		[self configureMenuBarIconsMenu];
 	}
+	
+	if (type)
+		CFRelease(type);
 }
 
 /*!
diff -r 551c610ece99 -r d95e88e9cbfa Source/AILogViewerWindowController.m
--- a/Source/AILogViewerWindowController.m	Tue Jun 25 10:04:55 2013 +0200
+++ b/Source/AILogViewerWindowController.m	Tue Jun 25 23:15:09 2013 -0400
@@ -2585,7 +2585,7 @@
 
 - (void)deleteLogsAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode  contextInfo:(void *)contextInfo;
 {
-	NSArray *selectedLogs = (__bridge NSArray *)contextInfo;
+	NSArray *selectedLogs = (__bridge_transfer NSArray *)contextInfo;
 	if (returnCode == NSAlertFirstButtonReturn) {
 		[resultsLock lock];
 		
@@ -2653,7 +2653,7 @@
 	} else if ([selectedLogs count] == 1) {
 		[self deleteLogsAlertDidEnd:nil
 						 returnCode:NSAlertFirstButtonReturn
-						contextInfo:(__bridge_retained void *)(selectedLogs)];
+						contextInfo:(__bridge void *)(selectedLogs)];
 	}
 }
 
@@ -2721,7 +2721,7 @@
 
 - (void)deleteSelectedContactsFromSourceListAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
 {
-	NSArray *allSelectedToGroups = (__bridge NSArray *)contextInfo;
+	NSArray *allSelectedToGroups = (__bridge_transfer NSArray *)contextInfo;
 	if (returnCode == NSAlertFirstButtonReturn) {
 		AILogToGroup	*logToGroup;
 		NSMutableSet	*logPaths = [NSMutableSet set];
@@ -2769,7 +2769,7 @@
 	} else {
 		[self deleteSelectedContactsFromSourceListAlertDidEnd:nil
 												   returnCode:NSAlertFirstButtonReturn
-												  contextInfo:(__bridge_retained void *)(allSelectedToGroups)];
+												  contextInfo:(__bridge void *)(allSelectedToGroups)];
 	}
 }
 
diff -r 551c610ece99 -r d95e88e9cbfa Source/AIPreferenceWindowController.m
--- a/Source/AIPreferenceWindowController.m	Tue Jun 25 10:04:55 2013 +0200
+++ b/Source/AIPreferenceWindowController.m	Tue Jun 25 23:15:09 2013 -0400
@@ -199,6 +199,7 @@
 												doc,
 												(__bridge CFStringRef)contents,
 												NO);
+					CFRelease(doc);
 				}];
 			}];
 		}
@@ -218,6 +219,7 @@
 										doc,
 										(__bridge CFStringRef)paneName,
 										NO);
+			CFRelease(doc);
 		};
 		[generalPaneArray enumerateObjectsUsingBlock:_skPaneNames];
 		[appearancePaneArray enumerateObjectsUsingBlock:_skPaneNames];
diff -r 551c610ece99 -r d95e88e9cbfa Source/ESContactListAdvancedPreferences.m
--- a/Source/ESContactListAdvancedPreferences.m	Tue Jun 25 10:04:55 2013 +0200
+++ b/Source/ESContactListAdvancedPreferences.m	Tue Jun 25 23:15:09 2013 -0400
@@ -136,6 +136,9 @@
 		[popUp_listLayout selectItemWithRepresentedObject:[adium.preferenceController preferenceForKey:KEY_LIST_LAYOUT_NAME
 																								 group:PREF_GROUP_APPEARANCE]];
 	}
+	
+	if (type)
+		CFRelease(type);
 }
 
 /*!
diff -r 551c610ece99 -r d95e88e9cbfa xcconfigs/Release.xcconfig
--- a/xcconfigs/Release.xcconfig	Tue Jun 25 10:04:55 2013 +0200
+++ b/xcconfigs/Release.xcconfig	Tue Jun 25 23:15:09 2013 -0400
@@ -3,7 +3,7 @@
 DEPLOYMENT_POSTPROCESSING = YES
 APPLY_RULES_IN_COPY_FILES = YES
 GCC_DEBUGGING_SYMBOLS = used
-COPY_PHASE_STRIP = YES
+COPY_PHASE_STRIP = NO
 INFOPLIST_OUTPUT_FORMAT = binary
 PLIST_FILE_OUTPUT_FORMAT = binary
 STRINGS_FILE_OUTPUT_ENCODING = binary
\ No newline at end of file




More information about the commits mailing list