Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Support both ARC and non-ARC environments automatically at compile time.

  • Loading branch information...
commit eb8640b1be9d1f5bbc258ab8e04345d390b9e816 1 parent 4ccb2d8
Mark Granoff authored

Showing 2 changed files with 14 additions and 2 deletions. Show diff stats Hide diff stats

  1. +9 0 LockBox/LockBox/AppDelegate.m
  2. +5 2 Lockbox.m
9 LockBox/LockBox/AppDelegate.m
@@ -25,6 +25,15 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
25 25 return YES;
26 26 }
27 27
  28 +#if !__has_feature(objc_arc)
  29 +-(void)dealloc
  30 +{
  31 + [_viewController release];
  32 + [_window release];
  33 + [super dealloc];
  34 +}
  35 +#endif
  36 +
28 37 - (void)applicationWillResignActive:(UIApplication *)application
29 38 {
30 39 // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
7 Lockbox.m
@@ -93,11 +93,14 @@ +(NSString *)objectForKey:(NSString *)key
93 93 if (!data)
94 94 return nil;
95 95
96   - NSString *s = [[[NSString alloc]
  96 + NSString *s = [[NSString alloc]
97 97 initWithData: data
98   - encoding: NSUTF8StringEncoding] autorelease];
  98 + encoding: NSUTF8StringEncoding];
99 99
  100 +#if !__has_feature(objc_arc)
  101 + [s autorelease];
100 102 [data autorelease];
  103 +#endif
101 104
102 105 return s;
103 106 }

0 comments on commit eb8640b

Please sign in to comment.
Something went wrong with that request. Please try again.