Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated the project to use ARC.

  • Loading branch information...
commit 7a2c14b137a9d6e7bebf0a43f9a34b1037024522 1 parent 572c599
Yaogang Lian ylian authored
Showing with 179 additions and 272 deletions.
  1. +10 −10 BetterTransit/BTTransit.h
  2. +11 −18 BetterTransit/BTTransit.m
  3. +4 −4 BetterTransit/BTTransitDelegate.h
  4. +4 −5 BetterTransit/BTTransitDelegate.m
  5. +5 −5 BetterTransit/Controllers/BTFeedLoader.h
  6. +4 −5 BetterTransit/Controllers/BTFeedLoader.m
  7. +2 −2 BetterTransit/Controllers/BTLocationManager.h
  8. +2 −3 BetterTransit/Controllers/BTLocationManager.m
  9. +7 −7 BetterTransit/Controllers/BTMapViewController.h
  10. +1 −11 BetterTransit/Controllers/BTMapViewController.m
  11. +12 −12 BetterTransit/Controllers/BTPredictionViewController.h
  12. +15 −20 BetterTransit/Controllers/BTPredictionViewController.m
  13. +3 −3 BetterTransit/Controllers/BTRoutesViewController.h
  14. +1 −6 BetterTransit/Controllers/BTRoutesViewController.m
  15. +1 −1  BetterTransit/Controllers/BTScheduleViewController.h
  16. +1 −3 BetterTransit/Controllers/BTScheduleViewController.m
  17. +3 −3 BetterTransit/Controllers/BTSearchViewController.h
  18. +7 −10 BetterTransit/Controllers/BTSearchViewController.m
  19. +2 −2 BetterTransit/Controllers/BTSettingsViewController.h
  20. +3 −5 BetterTransit/Controllers/BTSettingsViewController.m
  21. +11 −11 BetterTransit/Controllers/BTStopsViewController.h
  22. +7 −24 BetterTransit/Controllers/BTStopsViewController.m
  23. +10 −10 BetterTransit/Controllers/BTTripViewController.h
  24. +6 −22 BetterTransit/Controllers/BTTripViewController.m
  25. +1 −1  BetterTransit/Controllers/BTUIViewController.h
  26. +1 −3 BetterTransit/Controllers/BTUIViewController.m
  27. +1 −1  BetterTransit/Models/BTAnnotation.h
  28. +0 −7 BetterTransit/Models/BTAnnotation.m
  29. +2 −2 BetterTransit/Models/BTPredictionEntry.h
  30. +5 −6 BetterTransit/Models/BTPredictionEntry.m
  31. +4 −4 BetterTransit/Models/BTRoute.h
  32. +4 −5 BetterTransit/Models/BTRoute.m
  33. +4 −4 BetterTransit/Models/BTStop.h
  34. +5 −6 BetterTransit/Models/BTStop.m
  35. +3 −3 BetterTransit/Models/BTTrip.h
  36. +4 −4 BetterTransit/Models/BTTrip.m
  37. +5 −5 BetterTransit/Views/BTPredictionCell.h
  38. +0 −9 BetterTransit/Views/BTPredictionCell.m
  39. +2 −2 BetterTransit/Views/BTRouteCell.h
  40. +2 −3 BetterTransit/Views/BTRouteCell.m
  41. +2 −2 BetterTransit/Views/BTStopCell.h
  42. +2 −3 BetterTransit/Views/BTStopCell.m
20 BetterTransit/BTTransit.h
View
@@ -16,29 +16,29 @@
}
// Database
-@property (nonatomic, retain) FMDatabase *db;
+@property (nonatomic, strong) FMDatabase *db;
-@property (nonatomic, retain) NSMutableArray *routes;
+@property (nonatomic, strong) NSMutableArray *routes;
// a dictionary for fast lookup of routes using routeId
-@property (nonatomic, retain) NSMutableDictionary * routeIds;
+@property (nonatomic, strong) NSMutableDictionary * routeIds;
// a dictionary for fast lookup of routes using short name (may not be unique)
-@property (nonatomic, retain) NSMutableDictionary * routeNames;
+@property (nonatomic, strong) NSMutableDictionary * routeNames;
// for RoutesView tab, organized in sections
-@property (nonatomic, retain) NSDictionary * routesToDisplay;
+@property (nonatomic, strong) NSDictionary * routesToDisplay;
-@property (nonatomic, retain) NSMutableArray *stops;
+@property (nonatomic, strong) NSMutableArray *stops;
// a dictionary for fast lookup of stops using stopId
-@property (nonatomic, retain) NSMutableDictionary * stopIds;
+@property (nonatomic, strong) NSMutableDictionary * stopIds;
// use tiles to quickly load annotations onto the map
-@property (nonatomic, retain) NSMutableArray *tiles;
+@property (nonatomic, strong) NSMutableArray *tiles;
-@property (nonatomic, retain) NSMutableArray *nearbyStops;
-@property (nonatomic, retain) NSMutableArray *favoriteStops;
+@property (nonatomic, strong) NSMutableArray *nearbyStops;
+@property (nonatomic, strong) NSMutableArray *favoriteStops;
- (void)loadData;
- (void)loadRoutesFromDB;
29 BetterTransit/BTTransit.m
View
@@ -84,7 +84,6 @@ - (void)loadRoutesFromDB
[self.routes addObject:route];
[self.routeIds setObject:route forKey:route.routeId];
[self.routeNames setObject:route forKey:route.shortName];
- [route release];
}
[rs close];
}
@@ -107,7 +106,6 @@ - (void)loadStopsFromDB
NSMutableArray *tile = [tiles objectAtIndex:stop.tileNumber];
[tile addObject:stop];
#endif
- [stop release];
}
[rs close];
}
@@ -115,7 +113,7 @@ - (void)loadStopsFromDB
- (void)loadRoutesToDisplayFromPlist:(NSString *)fileName
{
NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:@"plist"];
- self.routesToDisplay = [[[NSDictionary alloc] initWithContentsOfFile:path] autorelease];
+ self.routesToDisplay = [[NSDictionary alloc] initWithContentsOfFile:path];
}
- (void)loadScheduleForRoutes
@@ -192,7 +190,6 @@ - (NSArray *)tripsForRoute:(BTRoute *)route
else if (directionId != trip.directionId) {
// Save the old trip first
[trips addObject:trip];
- [trip release];
// Create a new trip
trip = [[BTTrip alloc] init];
@@ -208,7 +205,6 @@ - (NSArray *)tripsForRoute:(BTRoute *)route
// Save the trip
[trips addObject:trip];
- [trip release];
// Close the fetch cursor
[rs close];
@@ -265,29 +261,26 @@ - (void)sortStops:(NSMutableArray *)ss ByDistanceFrom:(CLLocation *)location
for (stop in ss) {
stopLocation = [[CLLocation alloc] initWithLatitude:stop.latitude longitude:stop.longitude];
stop.distance = [stopLocation getDistanceFrom:location]; // in meters
- [stopLocation release];
}
NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"distance" ascending:YES];
[ss sortUsingDescriptors:[NSArray arrayWithObject:sort]];
- [sort release];
}
- (void)dealloc
{
- [routes release], routes = nil;
- [routeIds release], routeIds = nil;
- [routeNames release], routeNames = nil;
- [routesToDisplay release], routesToDisplay = nil;
- [stops release], stops = nil;
- [stopIds release], stopIds = nil;
- [tiles release], tiles = nil;
- [nearbyStops release], nearbyStops = nil;
- [favoriteStops release], favoriteStops = nil;
- [db close], [db release], db = nil;
+ routes = nil;
+ routeIds = nil;
+ routeNames = nil;
+ routesToDisplay = nil;
+ stops = nil;
+ stopIds = nil;
+ tiles = nil;
+ nearbyStops = nil;
+ favoriteStops = nil;
+ [db close], db, db = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [super dealloc];
}
8 BetterTransit/BTTransitDelegate.h
View
@@ -24,10 +24,10 @@
BTFeedLoader *feedLoader;
}
-@property (nonatomic, retain) IBOutlet UIWindow *window;
-@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
-@property (retain) IBOutlet BTTransit *transit;
-@property (retain) IBOutlet BTFeedLoader *feedLoader;
+@property (nonatomic, strong) IBOutlet UIWindow *window;
+@property (nonatomic, strong) IBOutlet UITabBarController *tabBarController;
+@property (strong) IBOutlet BTTransit *transit;
+@property (strong) IBOutlet BTFeedLoader *feedLoader;
// Create view controllers
- (BTPredictionViewController *)createPredictionViewController;
9 BetterTransit/BTTransitDelegate.m
View
@@ -122,12 +122,11 @@ - (void)applicationDidBecomeActive:(UIApplication *)application
- (void)dealloc
{
- [window release], window = nil;
- [tabBarController release], tabBarController = nil;
+ window = nil;
+ tabBarController = nil;
- [transit release], transit = nil;
- [feedLoader release], feedLoader = nil;
- [super dealloc];
+ transit = nil;
+ feedLoader = nil;
}
@end
10 BetterTransit/Controllers/BTFeedLoader.h
View
@@ -22,16 +22,16 @@
@interface BTFeedLoader : NSObject
{
NSMutableArray *prediction; // includes prediction for all available routes
- NSObject<BTFeedLoaderDelegate> *delegate;
+ NSObject<BTFeedLoaderDelegate> *__unsafe_unretained delegate;
BTStop *currentStop;
ASINetworkQueue *networkQueue;
}
-@property (nonatomic, retain) IBOutlet BTTransit * transit;
-@property (nonatomic, retain) NSMutableArray *prediction;
-@property (assign) id<BTFeedLoaderDelegate> delegate;
-@property (nonatomic, retain) BTStop *currentStop;
+@property (nonatomic, strong) IBOutlet BTTransit * transit;
+@property (nonatomic, strong) NSMutableArray *prediction;
+@property (unsafe_unretained) id<BTFeedLoaderDelegate> delegate;
+@property (nonatomic, strong) BTStop *currentStop;
- (NSString *)dataSourceForStop:(BTStop *)stop;
- (void)getPredictionForStop:(BTStop *)stop;
9 BetterTransit/Controllers/BTFeedLoader.m
View
@@ -79,16 +79,15 @@ - (void)cancelAllDownloads
- (void)dealloc
{
- [transit release], transit = nil;
- [prediction release], prediction = nil;
- [currentStop release], currentStop = nil;
+ transit = nil;
+ prediction = nil;
+ currentStop = nil;
[networkQueue cancelAllOperations];
[networkQueue setDelegate:nil];
- [networkQueue release], networkQueue = nil;
+ networkQueue = nil;
delegate = nil;
- [super dealloc];
}
4 BetterTransit/Controllers/BTLocationManager.h
View
@@ -17,10 +17,10 @@
CLLocation *currentLocation;
}
-@property (nonatomic, retain) CLLocationManager *locationManager;
+@property (nonatomic, strong) CLLocationManager *locationManager;
@property (nonatomic, assign) BOOL isUpdatingLocation;
@property (nonatomic, assign) BOOL locationFound;
-@property (nonatomic, retain) CLLocation *currentLocation;
+@property (nonatomic, strong) CLLocation *currentLocation;
+ (BTLocationManager *)sharedInstance;
5 BetterTransit/Controllers/BTLocationManager.m
View
@@ -48,9 +48,8 @@ - (id)init
- (void)dealloc
{
locationManager.delegate = nil;
- [locationManager release], locationManager = nil;
- [currentLocation release], currentLocation = nil;
- [super dealloc];
+ locationManager = nil;
+ currentLocation = nil;
}
- (CLLocation *)currentLocation
14 BetterTransit/Controllers/BTMapViewController.h
View
@@ -25,13 +25,13 @@
UIActivityIndicatorView *activityIndicatorView;
}
-@property (nonatomic, retain) NSArray *stops;
-@property (nonatomic, retain) IBOutlet MKMapView *mapView;
-@property (nonatomic, retain) NSMutableArray *annotations;
-@property (nonatomic, retain) NSMutableArray *lastVisibleTiles;
-@property (nonatomic, retain) UIBarButtonItem *locationUpdateButton;
-@property (nonatomic, retain) UIBarButtonItem *activityIndicator;
-@property (nonatomic, retain) UIActivityIndicatorView *activityIndicatorView;
+@property (nonatomic, strong) NSArray *stops;
+@property (nonatomic, strong) IBOutlet MKMapView *mapView;
+@property (nonatomic, strong) NSMutableArray *annotations;
+@property (nonatomic, strong) NSMutableArray *lastVisibleTiles;
+@property (nonatomic, strong) UIBarButtonItem *locationUpdateButton;
+@property (nonatomic, strong) UIBarButtonItem *activityIndicator;
+@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView;
- (void)setCenterLocation:(CLLocation *)location;
- (void)updateAnnotations;
12 BetterTransit/Controllers/BTMapViewController.m
View
@@ -121,16 +121,8 @@ - (void)viewDidUnload
- (void)dealloc
{
DDLogVerbose(@">>> %s <<<", __PRETTY_FUNCTION__);
- [stops release];
- [mapView release];
- [annotations release];
- [lastVisibleTiles release];
- [locationUpdateButton release];
- [activityIndicator release];
- [activityIndicatorView release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [super dealloc];
}
@@ -244,7 +236,6 @@ - (void)addAnnotations
annotation.coordinate = coordinate;
annotation.stop = stop;
[self.annotations addObject:annotation];
- [annotation release];
}
}
[mapView addAnnotations:self.annotations];
@@ -294,7 +285,7 @@ - (MKAnnotationView *)mapView:(MKMapView *)mv viewForAnnotation:(id)annotation
static NSString *defaultID = @"AnnotationViewID";
annotationView = (MKAnnotationView *)[mv dequeueReusableAnnotationViewWithIdentifier:defaultID];
if (annotationView == nil) {
- annotationView = [[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:defaultID] autorelease];
+ annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:defaultID];
}
annotationView.canShowCallout = YES;
@@ -326,7 +317,6 @@ - (void)mapView:(MKMapView *)mv annotationView:(MKAnnotationView *)av calloutAcc
controller.stop = annotation.stop;
controller.prediction = nil;
[self.navigationController pushViewController:controller animated:YES];
- [controller release];
}
- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated
24 BetterTransit/Controllers/BTPredictionViewController.h
View
@@ -49,18 +49,18 @@ BTFeedLoaderDelegate, EGORefreshTableHeaderDelegate>
NSString *errorMessage;
}
-@property (nonatomic, retain) BTStop *stop;
-@property (nonatomic, retain) NSMutableArray *prediction;
-@property (nonatomic, retain) IBOutlet UITableView *mainTableView;
-@property (nonatomic, retain) IBOutlet UIView *stopInfoView;
-@property (nonatomic, retain) EGORefreshTableHeaderView *_refreshHeaderView;
-@property (nonatomic, retain) IBOutlet MKMapView *mapView;
-@property (nonatomic, retain) IBOutlet UILabel *stopDescLabel;
-@property (nonatomic, retain) IBOutlet UILabel *stopIdLabel;
-@property (nonatomic, retain) IBOutlet UILabel *stopDistanceLabel;
-@property (nonatomic, retain) IBOutlet UIButton *favButton;
-@property (nonatomic, retain) NSTimer *timer;
-@property (nonatomic, retain) NSString *errorMessage;
+@property (nonatomic, strong) BTStop *stop;
+@property (nonatomic, strong) NSMutableArray *prediction;
+@property (nonatomic, strong) IBOutlet UITableView *mainTableView;
+@property (nonatomic, strong) IBOutlet UIView *stopInfoView;
+@property (nonatomic, strong) EGORefreshTableHeaderView *_refreshHeaderView;
+@property (nonatomic, strong) IBOutlet MKMapView *mapView;
+@property (nonatomic, strong) IBOutlet UILabel *stopDescLabel;
+@property (nonatomic, strong) IBOutlet UILabel *stopIdLabel;
+@property (nonatomic, strong) IBOutlet UILabel *stopDistanceLabel;
+@property (nonatomic, strong) IBOutlet UIButton *favButton;
+@property (nonatomic, strong) NSTimer *timer;
+@property (nonatomic, strong) NSString *errorMessage;
- (IBAction)setFav:(id)sender;
- (void)checkBusArrival;
35 BetterTransit/Controllers/BTPredictionViewController.m
View
@@ -59,7 +59,6 @@ - (void)viewDidLoad
// Setup title view
TitleViewLabel *label = [[TitleViewLabel alloc] initWithText:stop.stopName];
self.navigationItem.titleView = label;
- [label release];
// mapView settings
[mapView setMapType:MKMapTypeStandard];
@@ -72,7 +71,6 @@ - (void)viewDidLoad
[v refreshLastUpdatedDate];
[self.mainTableView addSubview:v];
self._refreshHeaderView = v;
- [v release];
}
}
@@ -113,7 +111,6 @@ - (void)viewWillAppear:(BOOL)animated
annotation.coordinate = coordinate;
annotation.stop = stop;
[mapView addAnnotation:annotation];
- [annotation release];
// set map view region
MKCoordinateRegion region = {{0.0, 0.0}, {0.0, 0.0}};
@@ -194,19 +191,18 @@ - (void)viewDidUnload
- (void)dealloc
{
DDLogVerbose(@">>> %s <<<", __PRETTY_FUNCTION__);
- [stop release], stop = nil;
- [prediction release], prediction = nil;
- [mainTableView release], mainTableView = nil;
+ stop = nil;
+ prediction = nil;
+ mainTableView = nil;
[_refreshHeaderView setDelegate:nil];
- [_refreshHeaderView release], _refreshHeaderView = nil;
- [mapView release], mapView = nil;
- [stopDescLabel release], stopDescLabel = nil;
- [stopIdLabel release], stopIdLabel = nil;
- [stopDistanceLabel release], stopDistanceLabel = nil;
- [favButton release], favButton = nil;
- [timer release], timer = nil;
- [errorMessage release], errorMessage = nil;
- [super dealloc];
+ _refreshHeaderView = nil;
+ mapView = nil;
+ stopDescLabel = nil;
+ stopIdLabel = nil;
+ stopDistanceLabel = nil;
+ favButton = nil;
+ timer = nil;
+ errorMessage = nil;
}
@@ -327,7 +323,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:StopInfoCellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:StopInfoCellIdentifier] autorelease];
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:StopInfoCellIdentifier];
[cell.contentView addSubview:stopInfoView];
cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"fiber_paper.png"]];
}
@@ -340,7 +336,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
{
LoadingCell *cell = (LoadingCell *)[tableView dequeueReusableCellWithIdentifier:LoadingCellIdentifier];
if (cell == nil) {
- cell = [[[LoadingCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:LoadingCellIdentifier] autorelease];
+ cell = [[LoadingCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:LoadingCellIdentifier];
}
[cell setText:@"Loading bus arrival times..."];
@@ -354,7 +350,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
{
ErrorCell *cell = (ErrorCell *)[tableView dequeueReusableCellWithIdentifier:ErrorCellIdentifier];
if (cell == nil) {
- cell = [[[ErrorCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ErrorCellIdentifier] autorelease];
+ cell = [[ErrorCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ErrorCellIdentifier];
}
cell.label = self.errorMessage;
cell.image = [UIImage imageNamed:@"icn_warning.png"];
@@ -381,14 +377,13 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell.estimateLabel.text = entry.eta;
NSString *imageName = [NSString stringWithFormat:@"%@.png", entry.route.shortName];
- UIImage *routeImage = [[UIImage imageNamed:imageName] retain];
+ UIImage *routeImage = [UIImage imageNamed:imageName];
if (routeImage) {
[cell.imageView setImage:routeImage];
} else {
cell.idLabel.hidden = NO;
cell.idLabel.text = entry.route.shortName;
}
- [routeImage release];
return cell;
}
6 BetterTransit/Controllers/BTRoutesViewController.h
View
@@ -20,8 +20,8 @@
UITableView *mainTableView;
}
-@property (nonatomic, retain) NSDictionary *routesToDisplay;
-@property (nonatomic, retain) NSArray *sectionNames;
-@property (nonatomic, retain) IBOutlet UITableView *mainTableView;
+@property (nonatomic, strong) NSDictionary *routesToDisplay;
+@property (nonatomic, strong) NSArray *sectionNames;
+@property (nonatomic, strong) IBOutlet UITableView *mainTableView;
@end
7 BetterTransit/Controllers/BTRoutesViewController.m
View
@@ -72,10 +72,6 @@ - (void)viewDidUnload
- (void)dealloc
{
DDLogVerbose(@">>> %s <<<", __PRETTY_FUNCTION__);
- [routesToDisplay release];
- [sectionNames release];
- [mainTableView release];
- [super dealloc];
}
@@ -100,7 +96,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
BTRouteCell *cell = (BTRouteCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[AppDelegate createRouteCellWithIdentifier:CellIdentifier] autorelease];
+ cell = [AppDelegate createRouteCellWithIdentifier:CellIdentifier];
}
NSString *key = [self.sectionNames objectAtIndex:indexPath.section];
@@ -152,7 +148,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
BTTripViewController *controller = [AppDelegate createTripViewController];
controller.route = selectedRoute;
[self.navigationController pushViewController:controller animated:YES];
- [controller release];
}
@end
2  BetterTransit/Controllers/BTScheduleViewController.h
View
@@ -16,7 +16,7 @@
BTRoute * route;
}
-@property (nonatomic, retain) BTRoute * route;
+@property (nonatomic, strong) BTRoute * route;
- (void)done:(id)sender;
4 BetterTransit/Controllers/BTScheduleViewController.m
View
@@ -40,7 +40,6 @@ - (void)viewDidLoad
UIBarButtonItem * doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done:)];
self.navigationItem.leftBarButtonItem = doneButton;
- [doneButton release];
}
- (void)viewWillAppear:(BOOL)animated
@@ -77,8 +76,7 @@ - (void)viewDidUnload
- (void)dealloc
{
DDLogVerbose(@">>> %s <<<", __PRETTY_FUNCTION__);
- [route release], route = nil;
- [super dealloc];
+ route = nil;
}
6 BetterTransit/Controllers/BTSearchViewController.h
View
@@ -29,9 +29,9 @@
BOOL noResultsLabelIsShown;
}
-@property (nonatomic, retain) IBOutlet UISearchBar *searchBar;
-@property (nonatomic, retain) IBOutlet UITableView *mainTableView;
-@property (nonatomic, retain) NSArray *stops;
+@property (nonatomic, strong) IBOutlet UISearchBar *searchBar;
+@property (nonatomic, strong) IBOutlet UITableView *mainTableView;
+@property (nonatomic, strong) NSArray *stops;
- (void)handleSearchForTerm:(NSString *)term;
- (void)registerForKeyboardNotifications;
17 BetterTransit/Controllers/BTSearchViewController.m
View
@@ -104,12 +104,11 @@ - (void)viewDidUnload
- (void)dealloc
{
DDLogVerbose(@">>> %s <<<", __PRETTY_FUNCTION__);
- [searchBar release], searchBar = nil;
- [mainTableView release], mainTableView = nil;
- [stops release], stops = nil;
- [bigCancelButton release], bigCancelButton = nil;
- [noResultsLabel release], noResultsLabel = nil;
- [super dealloc];
+ searchBar = nil;
+ mainTableView = nil;
+ stops = nil;
+ bigCancelButton = nil;
+ noResultsLabel = nil;
}
@@ -133,17 +132,16 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
BTStopCell *cell = (BTStopCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[BTStopCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ cell = [[BTStopCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
BTStop *stop = [self.stops objectAtIndex:indexPath.row];
cell.stop = stop;
NSString *imageName = [NSString stringWithFormat:@"stop_%d.png", stop.stopColor];
- UIImage *stopImage = [[UIImage imageNamed:imageName] retain];
+ UIImage *stopImage = [UIImage imageNamed:imageName];
if (stopImage != nil) {
cell.iconImage = stopImage;
- [stopImage release];
} else {
cell.iconImage = [UIImage imageNamed:@"default_stop.png"];
}
@@ -161,7 +159,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
controller.stop = selectedStop;
controller.prediction = nil;
[self.navigationController pushViewController:controller animated:YES];
- [controller release];
}
- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
4 BetterTransit/Controllers/BTSettingsViewController.h
View
@@ -17,7 +17,7 @@
BTTransit *transit;
}
-@property (nonatomic, retain) NSArray *startupScreenOptions;
-@property (nonatomic, retain) NSArray *maxNumNearbyStopsOptions;
+@property (nonatomic, strong) NSArray *startupScreenOptions;
+@property (nonatomic, strong) NSArray *maxNumNearbyStopsOptions;
@end
8 BetterTransit/Controllers/BTSettingsViewController.m
View
@@ -52,9 +52,8 @@ - (void)viewWillAppear:(BOOL)animated
- (void)dealloc
{
DDLogVerbose(@">>> %s <<<", __PRETTY_FUNCTION__);
- [startupScreenOptions release], startupScreenOptions = nil;
- [maxNumNearbyStopsOptions release], maxNumNearbyStopsOptions = nil;
- [super dealloc];
+ startupScreenOptions = nil;
+ maxNumNearbyStopsOptions = nil;
}
@@ -91,7 +90,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
{
cell = [tableView dequeueReusableCellWithIdentifier:BTSettingsCellIdentifier];
if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:BTSettingsCellIdentifier] autorelease];
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:BTSettingsCellIdentifier];
}
switch (indexPath.row) {
@@ -142,7 +141,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
controller.delegate = self;
[self.navigationController pushViewController:controller animated:YES];
- [controller release];
}
else {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
22 BetterTransit/Controllers/BTStopsViewController.h
View
@@ -34,18 +34,18 @@
BOOL viewIsShown;
}
-@property (nonatomic, retain) NSArray *stops;
-@property (nonatomic, retain) IBOutlet UITableView *mainTableView;
-@property (nonatomic, retain) UIActivityIndicatorView * loadingSpinner;
-@property (nonatomic, retain) UIImageView *addToFavsView;
-@property (nonatomic, retain) UIImageView *noNearbyStopsView;
-@property (nonatomic, retain) UISegmentedControl *segmentedControl;
-@property (nonatomic, retain) UIBarButtonItem *locationUpdateButton;
-@property (nonatomic, retain) UIBarButtonItem *spinnerBarItem;
-@property (nonatomic, retain) UIActivityIndicatorView *spinner;
+@property (nonatomic, strong) NSArray *stops;
+@property (nonatomic, strong) IBOutlet UITableView *mainTableView;
+@property (nonatomic, strong) UIActivityIndicatorView * loadingSpinner;
+@property (nonatomic, strong) UIImageView *addToFavsView;
+@property (nonatomic, strong) UIImageView *noNearbyStopsView;
+@property (nonatomic, strong) UISegmentedControl *segmentedControl;
+@property (nonatomic, strong) UIBarButtonItem *locationUpdateButton;
+@property (nonatomic, strong) UIBarButtonItem *spinnerBarItem;
+@property (nonatomic, strong) UIActivityIndicatorView *spinner;
@property (nonatomic, assign) BOOL isEditing;
-@property (nonatomic, retain) UIBarButtonItem *editButton;
-@property (nonatomic, retain) UIBarButtonItem *doneButton;
+@property (nonatomic, strong) UIBarButtonItem *editButton;
+@property (nonatomic, strong) UIBarButtonItem *doneButton;
@property (nonatomic, assign) BOOL viewIsShown;
- (IBAction)updateLocation:(id)sender;
31 BetterTransit/Controllers/BTStopsViewController.m
View
@@ -45,7 +45,7 @@ - (void)viewDidLoad
self.isEditing = NO;
// Setup the loading spinner in the middle of page
- self.loadingSpinner = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray] autorelease];
+ self.loadingSpinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
loadingSpinner.center = CGPointMake(160, 180);
loadingSpinner.hidesWhenStopped = YES;
[self.view addSubview:loadingSpinner];
@@ -53,7 +53,7 @@ - (void)viewDidLoad
// Setup segmented control
NSArray *items = [NSArray arrayWithObjects:NSLocalizedString(@"Nearby", @""),
NSLocalizedString(@"Favorites", @""), nil];
- self.segmentedControl = [[[UISegmentedControl alloc] initWithItems:items] autorelease];
+ self.segmentedControl = [[UISegmentedControl alloc] initWithItems:items];
segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
segmentedControl.frame = CGRectMake(0, 0, 166, 30);
@@ -83,22 +83,18 @@ - (void)viewDidLoad
self.editButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit
target:self
action:@selector(editFavs:)];
- [editButton release];
self.doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:@selector(editFavs:)];
- [doneButton release];
// an illustration showing how to add a bus stop to favorites
self.addToFavsView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:ADD_TO_FAVS_PNG]];
- [addToFavsView release];
addToFavsView.hidden = YES;
[self.view addSubview:self.addToFavsView];
// an illustration showing that no nearby stops are found.
self.noNearbyStopsView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"noNearbyStops.png"]];
- [noNearbyStopsView release];
noNearbyStopsView.hidden = YES;
[self.view addSubview:self.noNearbyStopsView];
}
@@ -185,20 +181,10 @@ - (void)viewDidUnload
- (void)dealloc
{
DDLogVerbose(@">>> %s <<<", __PRETTY_FUNCTION__);
- [stops release];
- [mainTableView release];
- [loadingSpinner release];
- [addToFavsView release];
- [noNearbyStopsView release];
- [segmentedControl release];
- [locationUpdateButton release];
- [spinnerBarItem release];
- [spinner release];
- [editButton release], editButton = nil;
- [doneButton release], doneButton = nil;
+ editButton = nil;
+ doneButton = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
- [super dealloc];
}
@@ -348,17 +334,16 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
BTStopCell *cell = (BTStopCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[BTStopCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ cell = [[BTStopCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
BTStop *stop = [self.stops objectAtIndex:indexPath.row];
cell.stop = stop;
NSString *imageName = [NSString stringWithFormat:@"stop_%d.png", stop.stopColor];
- UIImage *stopImage = [[UIImage imageNamed:imageName] retain];
+ UIImage *stopImage = [UIImage imageNamed:imageName];
if (stopImage != nil) {
cell.iconImage = stopImage;
- [stopImage release];
} else {
cell.iconImage = [UIImage imageNamed:@"default_stop.png"];
}
@@ -376,7 +361,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
controller.stop = selectedStop;
controller.prediction = nil;
[self.navigationController pushViewController:controller animated:YES];
- [controller release];
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
@@ -415,10 +399,9 @@ - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
- BTStop *stop = [[stops objectAtIndex:fromIndexPath.row] retain];
+ BTStop *stop = [stops objectAtIndex:fromIndexPath.row];
[transit.favoriteStops removeObject:stop];
[transit.favoriteStops insertObject:stop atIndex:toIndexPath.row];
- [stop release];
}
20 BetterTransit/Controllers/BTTripViewController.h
View
@@ -30,16 +30,16 @@
UILabel *destIdLabel; // show route ID when route icon is not available
}
-@property (nonatomic, retain) BTRoute *route;
-@property (nonatomic, retain) NSArray *trips;
-@property (nonatomic, retain) NSArray *stops;
-@property (nonatomic, retain) IBOutlet UITableView *mainTableView;
-@property (nonatomic, retain) UISegmentedControl *segmentedControl;
-@property (nonatomic, retain) UIImageView *titleImageView;
-@property (nonatomic, retain) IBOutlet UIView *routeDestView;
-@property (nonatomic, retain) IBOutlet UILabel *destLabel;
-@property (nonatomic, retain) IBOutlet UIImageView *destImageView;
-@property (nonatomic, retain) IBOutlet UILabel *destIdLabel;
+@property (nonatomic, strong) BTRoute *route;
+@property (nonatomic, strong) NSArray *trips;
+@property (nonatomic, strong) NSArray *stops;
+@property (nonatomic, strong) IBOutlet UITableView *mainTableView;
+@property (nonatomic, strong) UISegmentedControl *segmentedControl;
+@property (nonatomic, strong) UIImageView *titleImageView;
+@property (nonatomic, strong) IBOutlet UIView *routeDestView;
+@property (nonatomic, strong) IBOutlet UILabel *destLabel;
+@property (nonatomic, strong) IBOutlet UIImageView *destImageView;
+@property (nonatomic, strong) IBOutlet UILabel *destIdLabel;
- (void)segmentAction:(id)sender;
28 BetterTransit/Controllers/BTTripViewController.m
View
@@ -57,19 +57,18 @@ - (void)viewDidLoad
scheduleButton.showsTouchWhenHighlighted = YES;
[scheduleButton setImage:[UIImage imageNamed:@"schedule.png"] forState:UIControlStateNormal];
[scheduleButton addTarget:self action:@selector(showSchedule:) forControlEvents:UIControlEventTouchUpInside];
- UIBarButtonItem *scheduleBarButton = [[[UIBarButtonItem alloc] initWithCustomView:scheduleButton] autorelease];
+ UIBarButtonItem *scheduleBarButton = [[UIBarButtonItem alloc] initWithCustomView:scheduleButton];
self.navigationItem.rightBarButtonItem = scheduleBarButton;
}
self.navigationItem.title = [NSString stringWithFormat:@"Route %@", route.shortName];
NSString *imageName = [NSString stringWithFormat:@"%@_white.png", route.shortName];
- UIImage *titleImage = [[UIImage imageNamed:imageName] retain];
+ UIImage *titleImage = [UIImage imageNamed:imageName];
if (titleImage) {
titleImageView = [[UIImageView alloc] initWithImage:titleImage];
} else {
titleImageView = nil;
}
- [titleImage release];
NSArray *items = [NSArray arrayWithObjects:@"", @"", nil];
segmentedControl = [[UISegmentedControl alloc] initWithItems:items];
@@ -89,7 +88,7 @@ - (void)viewDidLoad
self.navigationItem.titleView = segmentedControl;
NSString *imageName = [NSString stringWithFormat:@"%@_white.png", route.shortName];
- UIImage *routeImage = [[UIImage imageNamed:imageName] retain];
+ UIImage *routeImage = [UIImage imageNamed:imageName];
if (routeImage) {
[destImageView setImage:routeImage];
} else {
@@ -97,7 +96,6 @@ - (void)viewDidLoad
destIdLabel.hidden = NO;
destIdLabel.text = route.shortName;
}
- [routeImage release];
destLabel.text = [NSString stringWithFormat:@"To %@", [[trips objectAtIndex:0] headsign]];
[self.view addSubview:routeDestView];
@@ -141,17 +139,7 @@ - (void)viewDidUnload
- (void)dealloc
{
DDLogVerbose(@">>> %s <<<", __PRETTY_FUNCTION__);
- [route release];
- [trips release];
- [stops release];
- [mainTableView release];
- [segmentedControl release];
- [titleImageView release];
-
- [destLabel release];
- [destImageView release];
- [destIdLabel release];
- [super dealloc];
+
}
@@ -175,8 +163,6 @@ - (void)showSchedule:(id)sender
UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:controller];
nav.navigationBar.tintColor = COLOR_NAV_BAR_BG;
[self.navigationController presentModalViewController:nav animated:YES];
- [controller release];
- [nav release];
}
}
@@ -200,17 +186,16 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
BTStopCell *cell = (BTStopCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
- cell = [[[BTStopCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+ cell = [[BTStopCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
BTStop *stop = [self.stops objectAtIndex:indexPath.row];
cell.stop = stop;
NSString *imageName = [NSString stringWithFormat:@"%@_rail.png", route.shortName];
- UIImage *railImage = [[UIImage imageNamed:imageName] retain];
+ UIImage *railImage = [UIImage imageNamed:imageName];
if (railImage != nil) {
cell.iconImage = railImage;
- [railImage release];
} else {
cell.iconImage = [UIImage imageNamed:@"default_rail.png"];
}
@@ -229,7 +214,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
controller.stop = selectedStop;
controller.prediction = nil;
[self.navigationController pushViewController:controller animated:YES];
- [controller release];
}
@end
2  BetterTransit/Controllers/BTUIViewController.h
View
@@ -12,6 +12,6 @@
@interface BTUIViewController : UIViewController {
}
-@property (nonatomic, retain) UIImageView *backdrop;
+@property (nonatomic, strong) UIImageView *backdrop;
@end
4 BetterTransit/Controllers/BTUIViewController.m
View
@@ -18,7 +18,6 @@ - (void)viewDidLoad
[super viewDidLoad];
self.backdrop = [[UIImageView alloc] initWithFrame:self.view.bounds];
- [backdrop release];
backdrop.image = [UIImage imageNamed:@"backdrop.png"];
[self.view insertSubview:backdrop atIndex:0];
backdrop.alpha = 1.0;
@@ -41,8 +40,7 @@ - (void)viewDidUnload
- (void)dealloc
{
- [backdrop release], backdrop = nil;
- [super dealloc];
+ backdrop = nil;
}
@end
2  BetterTransit/Models/BTAnnotation.h
View
@@ -21,6 +21,6 @@
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *subtitle;
-@property (nonatomic, retain) BTStop *stop;
+@property (nonatomic, strong) BTStop *stop;
@end
7 BetterTransit/Models/BTAnnotation.m
View
@@ -13,12 +13,5 @@ @implementation BTAnnotation
@synthesize coordinate, title, subtitle, stop;
-- (void)dealloc
-{
- [title release];
- [subtitle release];
- [stop release];
- [super dealloc];
-}
@end
4 BetterTransit/Models/BTPredictionEntry.h
View
@@ -23,8 +23,8 @@
NSString *info; // extra information
}
-@property (nonatomic, retain) BTRoute *route;
-@property (nonatomic, retain) BTStop *stop;
+@property (nonatomic, strong) BTRoute *route;
+@property (nonatomic, strong) BTStop *stop;
@property (nonatomic, copy) NSString *destination;
@property (nonatomic, copy) NSString *eta;
@property (assign) BOOL shouldDownloadData;
11 BetterTransit/Models/BTPredictionEntry.m
View
@@ -26,12 +26,11 @@ - (id)init
- (void)dealloc
{
- [route release], route = nil;
- [stop release], stop = nil;
- [destination release], destination = nil;
- [eta release], eta = nil;
- [info release], info = nil;
- [super dealloc];
+ route = nil;
+ stop = nil;
+ destination = nil;
+ eta = nil;
+ info = nil;
}
- (NSComparisonResult)sortByRouteIdNumerically:(BTPredictionEntry *)other
8 BetterTransit/Models/BTRoute.h
View
@@ -12,10 +12,10 @@
@interface BTRoute : NSObject {
}
-@property (nonatomic, retain) NSString * routeId;
-@property (nonatomic, retain) NSString * agencyId;
-@property (nonatomic, retain) NSString * shortName;
-@property (nonatomic, retain) NSString * longName;
+@property (nonatomic, strong) NSString * routeId;
+@property (nonatomic, strong) NSString * agencyId;
+@property (nonatomic, strong) NSString * shortName;
+@property (nonatomic, strong) NSString * longName;
@property (nonatomic, assign) BOOL hasSchedule;
- (NSComparisonResult)sortByShortName:(BTRoute *)other;
9 BetterTransit/Models/BTRoute.m
View
@@ -24,11 +24,10 @@ - (id)init
- (void)dealloc
{
- [routeId release], routeId = nil;
- [agencyId release], agencyId = nil;
- [shortName release], shortName = nil;
- [longName release], longName = nil;
- [super dealloc];
+ routeId = nil;
+ agencyId = nil;
+ shortName = nil;
+ longName = nil;
}
- (NSComparisonResult)sortByShortName:(BTRoute *)other
8 BetterTransit/Models/BTStop.h
View
@@ -13,9 +13,9 @@
@interface BTStop : NSObject {
}
-@property (nonatomic, retain) NSString * stopId;
-@property (nonatomic, retain) NSString * stopCode;
-@property (nonatomic, retain) NSString * stopName;
+@property (nonatomic, strong) NSString * stopId;
+@property (nonatomic, strong) NSString * stopCode;
+@property (nonatomic, strong) NSString * stopName;
@property (nonatomic, assign) double latitude;
@property (nonatomic, assign) double longitude;
@property (nonatomic, assign) int stopSource; // Data source for retrieving ALL bus routes arrival times
@@ -25,6 +25,6 @@
@property BOOL favorite;
// stop has a selected route when invoked from the Trip View
-@property (nonatomic, retain) BTRoute * selectedRoute;
+@property (nonatomic, strong) BTRoute * selectedRoute;
@end
11 BetterTransit/Models/BTStop.m
View
@@ -7,7 +7,7 @@
//
#import "BTStop.h"
-
+#import "BTRoute.h"
@implementation BTStop
@@ -29,11 +29,10 @@ - (id)init
- (void)dealloc
{
- [stopId release], stopId = nil;
- [stopCode release], stopCode = nil;
- [stopName release], stopName = nil;
- [selectedRoute release], selectedRoute = nil;
- [super dealloc];
+ stopId = nil;
+ stopCode = nil;
+ stopName = nil;
+ selectedRoute = nil;
}
@end
6 BetterTransit/Models/BTTrip.h
View
@@ -13,9 +13,9 @@
@interface BTTrip : NSObject {
}
-@property (nonatomic, retain) BTRoute * route;
+@property (nonatomic, strong) BTRoute * route;
@property (nonatomic, assign) NSInteger directionId;
-@property (nonatomic, retain) NSString * headsign;
-@property (nonatomic, retain) NSMutableArray * stops;
+@property (nonatomic, strong) NSString * headsign;
+@property (nonatomic, strong) NSMutableArray * stops;
@end
8 BetterTransit/Models/BTTrip.m
View
@@ -7,6 +7,7 @@
//
#import "BTTrip.h"
+#import "BTRoute.h"
@implementation BTTrip
@@ -22,10 +23,9 @@ - (id)init
- (void)dealloc
{
- [route release], route = nil;
- [headsign release], headsign = nil;
- [stops release], stops = nil;
- [super dealloc];
+ route = nil;
+ headsign = nil;
+ stops = nil;
}
@end
10 BetterTransit/Views/BTPredictionCell.h
View
@@ -18,10 +18,10 @@
UILabel *idLabel; // show route ID when route icons are not available
}
-@property (nonatomic, retain) IBOutlet UIImageView *imageView;
-@property (nonatomic, retain) IBOutlet UILabel *routeLabel;
-@property (nonatomic, retain) IBOutlet UILabel *destinationLabel;
-@property (nonatomic, retain) IBOutlet UILabel *estimateLabel;
-@property (nonatomic, retain) IBOutlet UILabel *idLabel;
+@property (nonatomic, strong) IBOutlet UIImageView *imageView;
+@property (nonatomic, strong) IBOutlet UILabel *routeLabel;
+@property (nonatomic, strong) IBOutlet UILabel *destinationLabel;
+@property (nonatomic, strong) IBOutlet UILabel *estimateLabel;
+@property (nonatomic, strong) IBOutlet UILabel *idLabel;
@end
9 BetterTransit/Views/BTPredictionCell.m
View
@@ -31,14 +31,5 @@ - (void)setSelected:(BOOL)selected animated:(BOOL)animated
}
-- (void)dealloc
-{
- [imageView release];
- [routeLabel release];
- [destinationLabel release];
- [estimateLabel release];
- [idLabel release];
- [super dealloc];
-}
@end
4 BetterTransit/Views/BTRouteCell.h
View
@@ -16,8 +16,8 @@
UIImage *iconImage;
}
-@property (nonatomic, retain) BTRoute *route;
-@property (nonatomic, retain) UIImage *iconImage;
+@property (nonatomic, strong) BTRoute *route;
+@property (nonatomic, strong) UIImage *iconImage;
- (void)drawCellView:(CGRect)rect;
5 BetterTransit/Views/BTRouteCell.m
View
@@ -69,9 +69,8 @@ - (void)drawCellView:(CGRect)rect
- (void)dealloc
{
- [route release], route = nil;
- [iconImage release], iconImage = nil;
- [super dealloc];
+ route = nil;
+ iconImage = nil;
}
4 BetterTransit/Views/BTStopCell.h
View
@@ -16,8 +16,8 @@
UIImage *iconImage;
}
-@property (nonatomic, retain) BTStop *stop;
-@property (nonatomic, retain) UIImage *iconImage;
+@property (nonatomic, strong) BTStop *stop;
+@property (nonatomic, strong) UIImage *iconImage;
- (void)drawCellView:(CGRect)rect;
5 BetterTransit/Views/BTStopCell.m
View
@@ -93,9 +93,8 @@ - (void)drawCellView:(CGRect)rect
- (void)dealloc
{
- [stop release], stop = nil;
- [iconImage release], iconImage = nil;
- [super dealloc];
+ stop = nil;
+ iconImage = nil;
}
Please sign in to comment.
Something went wrong with that request. Please try again.