adium 4604:55c96289c8ab: Annotate XtrasInstaller to be acceptabl...
commits at adium.im
commits at adium.im
Sun Jan 29 17:22:12 UTC 2012
details: http://hg.adium.im/adium/rev/55c96289c8ab
revision: 4604:55c96289c8ab
branch: (none)
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Sun Jan 29 18:21:29 2012 +0100
Annotate XtrasInstaller to be acceptable for the static analyzer.
Subject: adium 4605:e0d22ede4de7: This plugin is never unloaded, but handle it just in case, so this doesn't look like a leak.
details: http://hg.adium.im/adium/rev/e0d22ede4de7
revision: 4605:e0d22ede4de7
branch: (none)
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Sun Jan 29 18:21:54 2012 +0100
This plugin is never unloaded, but handle it just in case, so this doesn't look like a leak.
diffs (68 lines):
diff -r 47eaa4e45396 -r e0d22ede4de7 Source/ESPersonalPreferencesPlugin.h
--- a/Source/ESPersonalPreferencesPlugin.h Sun Jan 29 18:12:22 2012 +0100
+++ b/Source/ESPersonalPreferencesPlugin.h Sun Jan 29 18:21:54 2012 +0100
@@ -16,7 +16,7 @@
@interface ESPersonalPreferencesPlugin : AIPlugin {
-
+ AIPreferencePane *preferencePane;
}
@end
diff -r 47eaa4e45396 -r e0d22ede4de7 Source/ESPersonalPreferencesPlugin.m
--- a/Source/ESPersonalPreferencesPlugin.m Sun Jan 29 18:12:22 2012 +0100
+++ b/Source/ESPersonalPreferencesPlugin.m Sun Jan 29 18:21:54 2012 +0100
@@ -30,7 +30,12 @@
forClass:[self class]]
forGroup:GROUP_ACCOUNT_STATUS];
- [[ESPersonalPreferences preferencePaneForPlugin:self] retain];
+ preferencePane = [[ESPersonalPreferences preferencePaneForPlugin:self] retain];
+}
+
+- (void)uninstallPlugin
+{
+ [preferencePane release]; preferencePane = nil;
}
@end
diff -r 47eaa4e45396 -r e0d22ede4de7 Source/XtrasInstaller.h
--- a/Source/XtrasInstaller.h Sun Jan 29 18:12:22 2012 +0100
+++ b/Source/XtrasInstaller.h Sun Jan 29 18:21:54 2012 +0100
@@ -29,7 +29,7 @@
}
-(IBAction)cancel:(id)sender;
--(void)installXtraAtURL:(NSURL *)url;
+-(void)installXtraAtURL:(NSURL *)url __attribute__((ns_consumes_self));
+(XtrasInstaller *)installer __attribute__((objc_method_family(new)));
@property (retain) NSURLDownload *download;
diff -r 47eaa4e45396 -r e0d22ede4de7 Source/XtrasInstaller.m
--- a/Source/XtrasInstaller.m Sun Jan 29 18:12:22 2012 +0100
+++ b/Source/XtrasInstaller.m Sun Jan 29 18:21:54 2012 +0100
@@ -22,7 +22,7 @@
#define ALLOW_UNTRUSTED_XTRAS NO
@interface XtrasInstaller ()
-- (void)closeInstaller;
+- (void)closeInstaller __attribute__((ns_consumes_self));
- (void)updateInfoText;
@end
@@ -304,12 +304,14 @@
quarantineProperties = [[(NSDictionary *)cfOldQuarantineProperties mutableCopy] autorelease];
} else {
AILogWithSignature(@"Getting quarantine data failed for %@ (%@)", self, self.dest);
+ [self closeInstaller];
return;
}
CFRelease(cfOldQuarantineProperties);
if (!quarantineProperties) {
+ [self closeInstaller];
return;
}
More information about the commits
mailing list