TWRequest подтекает?

Я использую TWRequest в ios5, но Leaks сообщает об утечке памяти для TWRequest.

Я делаю что-то вроде этого, я что-то не так делаю?

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];
 }];

1 ответ

Решение

Вы хотите изменить [TWRequest release]; в [postRequest release];

Другие вопросы по тегам