는 그래서 같은 NSOperationQueue를 사용하여 백그라운드 스레드에서 방법을 수행하려합니다 :NSOperationQueue 누출?
NSOperationQueue *queue = [NSOperationQueue new];
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self
selector:@selector(method)
object:nil];
[queue addOperation:operation];
[queue release];
[operation release];
문제는 분석기는 큐에 저장되어 누수가 있다고 말한다는 것이다.
어떻게 해결할 수 있습니까?
위의 코드는 어떻게됩니까? 분석기 경고가 사라졌지만 옳은 일을하고 있는지 확인하고 싶습니다! –