私はobjective-cが初めてで、Xcodeを理解しようとしています。
現在、次のコードで非常に大きな問題を抱えています。
AppDelegate.h
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate, CLLocationManagerDelegate, MKMapViewDelegate> {
    IBOutlet UIActivityIndicatorView *activityIndicator;
    IBOutlet UITextField *locationTitleField;
    IBOutlet MKMapView *worldView;
    IBOutlet CLLocationManager *locationManager;
}
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UIViewController *viewController;
@end
AppDelegate.m
    #import "AppDelegate.h"
    #import "ViewController.h"
    @implementation AppDelegate
    @synthesize window = window;
    @synthesize viewController = viewController;
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        locationManager = [[CLLocationManager alloc]init];
        [locationManager setDelegate:self];
        [locationManager setDistanceFilter:kCLDistanceFilterNone];
        [locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
        [worldView setShowsUserLocation:YES];
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
        self.window.rootViewController = self.viewController;
        [self.window makeKeyAndVisible];
        return YES;
   }
    - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation {
     // Yes, no code here, but here's the point, where I'm getting crashes, no matter if
     // there is some code in here, or not
    }
    @end
問題は、アプリを起動しようとすると、すべて問題ないことです。しかし、「didUpdateUserLocation」は本当に私を夢中にさせています。ゾンビ オブジェクトを有効にすると、Xcode から次のように通知されます。
[AppDelegate mapView:didUpdateUserLocation:]: message sent to deallocated instance 0xde1b700
(lldb) 
(!) 新しい ARC をオンにしましたが、オフにしても同じエラーが発生します。ご覧のとおり、私のコードには少なくとも 1 つのリリースが含まれていません。