私のアプリケーションから複数のダウンロードを開始するには、次のコードがあります。問題は、NSInvocationQueueがセレクタメソッドを呼び出さない、つまりdownloadMyVideosです。NSOperationQueueを使用して複数のビデオをダウンロード
私に知らせてください、正確に次のコードに間違いがありますか?
- (void)viewWillAppear:(BOOL)animated
{
[operationQueue cancelAllOperations];
operationQueue = [[NSOperationQueue alloc] init];
[operationQueue setSuspended:YES];
indexOperation = [[NSInvocationOperation alloc]initWithTarget:self selector:@selector(downloadMyVideo) object:nil];
[operationQueue addOperation:indexOperation];
}
(複数の)メモリリークがありますか?私は思うから。 –
@Jacob:はい!または、おそらくそれはARCの質問に慣れ始める時間です... – jtbandes
@jtbandes:Argh! ;) –