IM在iOS5中使用TWEXPRESS,但是泄漏报告了TWEXT的内存泄漏。
我在做这样的事,我是不是哪里出错了?

TWRequest *postRequest = [[TWRequest alloc] initWithURL:[NSURL URLWithString:@"http://api.twitter.com/1/friendships/create.json"] parameters:[NSDictionary dictionaryWithObject:@"auser"  forKey:@"screen_name"] requestMethod:TWRequestMethodPOST];

 // Set the account used to post the tweet.
 [postRequest setAccount:twitterAccount];

 // Perform the request created above and create a handler block to handle the response.
 [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
       NSString *output = [NSString stringWithFormat:@"HTTP response status: %i", [urlResponse statusCode]];

       [TWRequest release];
 }];

最佳答案

您需要将[TWRequest release];更改为[postRequest release];

09-07 03:00