Instruments (Leaks) reports a memory leak when using TWRequest and I can't really see what I'm doing wrong.
Here are the steps to reproduce the issue:
Create a new Xcode project (ARC disabled), add the Twitter Framework and then just added the following lines to the code (e.g. in viewDidLoad):
TWRequest *postRequest = [[TWRequest alloc] initWithURL:[NSURL URLWithString:@"http://api.twitter.com/1/statuses/public_timeline.json"] parameters:nil requestMethod:TWRequestMethodGET];
[postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
NSLog(@"in performrequest");
[postRequest release];
}];
After profiling this code with Instruments (Leaks), it's telling me that the line with "performRequestWithHandler" is leaking:
Any ideas what to do to prevent this leak?
I found a similar question here but it seems to be unrelated to the problem I'm describing.