Permalink
Browse files

retain loggers if used in non-arc project

  • Loading branch information...
1 parent 39e9509 commit 41c40a606c5a485a015bca01b76e3599ac8aa4a5 @chrispix chrispix committed Feb 13, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 AnalyticsKit.m
View
@@ -13,10 +13,14 @@ @implementation AnalyticsKit
static NSArray *_loggers = nil;
+(void)initialize {
- _loggers = [NSArray array];
+ _loggers = [[NSArray alloc] init];
}
+(void)initializeLoggers:(NSArray *)loggers {
+#if !__has_feature(objc_arc)
+ [loggers retain];
+ [_loggers release];
+#endif
_loggers = loggers;
}

0 comments on commit 41c40a6

Please sign in to comment.