Converted this deliberate “leak” into a class (static) ownership. Resolves a flag from the analyzer.
1.1 --- a/Extras/GrowlMail/GrowlMail.m Fri Oct 02 20:24:18 2009 -0700
1.2 +++ b/Extras/GrowlMail/GrowlMail.m Fri Oct 02 20:26:58 2009 -0700
1.3 @@ -42,6 +42,8 @@
1.4 return [NSBundle bundleForClass:[GrowlMail class]];
1.5 }
1.6
1.7 +static NSImage *growlMailIcon = nil;
1.8 +
1.9 @implementation GrowlMail
1.10
1.11 #pragma mark Boring bookkeeping stuff
1.12 @@ -58,9 +60,8 @@
1.13 {
1.14 class_setSuperclass([self class], mvMailBundleClass);
1.15
1.16 - // this image is leaked
1.17 - NSImage *image = [[NSImage alloc] initByReferencingFile:[GMGetGrowlMailBundle() pathForImageResource:@"GrowlMail"]];
1.18 - [image setName:@"GrowlMail"];
1.19 + growlMailIcon = [[NSImage alloc] initByReferencingFile:[GMGetGrowlMailBundle() pathForImageResource:@"GrowlMail"]];
1.20 + [growlMailIcon setName:@"GrowlMail"];
1.21
1.22 [GrowlMail registerBundle];
1.23