Skip to content

Commit

Permalink
SAFE_ARC_RETAIN CTTelephonyNetworkInfo object
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisliu committed Oct 29, 2014
1 parent a9561b2 commit 27e9e11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DeviceInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ -(NSString*) phoneCarrier {
SEL subscriberCellularProvider = NSSelectorFromString(@"subscriberCellularProvider");
SEL carrierName = NSSelectorFromString(@"carrierName");
if (CTTelephonyNetworkInfo && subscriberCellularProvider && carrierName) {
networkInfo = [[NSClassFromString(@"CTTelephonyNetworkInfo") alloc] init];
networkInfo = SAFE_ARC_RETAIN([[NSClassFromString(@"CTTelephonyNetworkInfo") alloc] init]);
id carrier = nil;
id (*imp1)(id, SEL) = (id (*)(id, SEL))[networkInfo methodForSelector:subscriberCellularProvider];
if (imp1) {
Expand Down

0 comments on commit 27e9e11

Please sign in to comment.