I have the following code that causes a leak even though ARC is included in this file:
TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init]; [tweetViewController setInitialText:[self facebookAndTwitterStatus]]; tweetViewController.completionHandler = ^(TWTweetComposeViewControllerResult result) { if(result == TWTweetComposeViewControllerResultDone) { // the user finished composing a tweet } else if(result == TWTweetComposeViewControllerResultCancelled) { // the user cancelled composing a tweet } [self dismissViewControllerAnimated:YES completion:nil]; }; [self presentViewController:tweetViewController animated:YES completion:nil]; [self hideSettingsPopover];
Obviously, I do not have a release, but how can I get rid of this leak?
source share