The following will perform a crash when setting CLBeacon to nil
.
CLBeacon *beacon = [[CLBeacon alloc] init];
beacon = nil; // crash
Is it not possible to deallocate an initialized CLBeacon
?
This can be reproduced by simply adding the code above to a fresh project inside the App Delegate's didFinishLaunchingWithOptions
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
CLBeacon *beacon = [[CLBeacon alloc] init];
beacon = nil; // crash
return YES;
}