Can someone please tell me why the following code is leaking in Instruments?
UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
activityController.excludedActivityTypes = [NSArray arrayWithObjects:@"a",@"b", nil];
[self presentViewController:activityController animated:YES completion:nil];
[activityController release];
Instruments show the leak on row:
activityController.excludedActivityTypes = [NSArray arrayWithObjects:@"a",@"b", nil];
The following should do the trick (__block and completion)
See also this SO