2012-02-26 5 views
1

performRequestWithHandler에 누수가있는 것처럼 보이지만 아래 함수를 작성했습니다.ARC 프로젝트에서 TWRequest 누수가

- (void)getDataForRequest:(TWRequest *)postRequest withSelector:(SEL)selector { 

if (twitterAccount != nil) { 

    [postRequest setAccount:twitterAccount]; 

    [postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error){ 

     id jsonResponse = nil; 

     if (responseData) { 
      NSError *jsonParsingError = nil; 
      jsonResponse = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&jsonParsingError]; 
     } 

     if (!jsonResponse) { 
      NSString *responseString = [[NSString alloc] initWithData:responseData encoding:NSASCIIStringEncoding]; 
      jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:responseString, @"response", nil]; 
     } 

     if (error != nil && ![jsonResponse objectForKey:@"error"]) { 

      NSString *errorMessage = error.localizedDescription; 
      jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:errorMessage, @"error", nil]; 

     } 

     [self performSelectorOnMainThread:selector withObject:jsonResponse waitUntilDone:NO];      


    }]; 
} 

} 역 추적하여

누설 :

유출 된 객체 ---- # ---- 주소 ---- 크기 ---- 책임 도서관 ---- 책임 프레임

XPCProxy 1 ---- ---- ---- 32 바이트 0x2c6480 ---- ---- 계정 - [ACOAuthSigner initWithAccount :]

NSArray를 1 ---- ---- 0x2cf010 ---- 64 바이트 ---- XPCObjects ---- - [XPCProxy restrictDecodin gToWhitelistedClassNames :]

MALLOC 128 바이트 1 ---- ---- 0x2d0650 ---- ---- 128 바이트의 libdispatch.dylib dispatch_queue_create $ 변이체 $의 MP

MALLOC 128 바이트 1 ---- ---- 0x2cf0f0 ---- 128 바이트 ---- libdispatch.dylib dispatch_queue_create $ VARIANT $ mp

고맙습니다.

+0

OS가 무엇입니까? ARC를 사용하고 있습니까? 좀비가 활성화 된 기기로 달리기를 시도 했습니까? –

+0

예 좀비가 활성화 된 악기를 사용했습니다. iOS 5와 ARC를 사용하고 있습니다. 감사. – ajayjapan

+0

솔루션을 찾았습니까? – iBiryukov

답변

0

iOS 5.0의 Apple API 코드 버그로 인해 발생했으며 지금 수정 된 것으로 보입니다.

관련 문제