0

What is possible reason of memory leak in following code snippet?

NSInvocationOperation* theOp = [[NSInvocationOperation alloc] 
                                initWithTarget:self 
                                selector:@selector(methodCall:) object:Nil];

[operationQueue addOperation:theOp];
[theOp release];
  • Any hints in the documentation of `initWithTarget:selector:object:`? – Willeke Aug 15 '20 at 08:34
  • The NSOperationQueue states the following: "Operation queues retain operations until they're finished, and queues themselves are retained until all operations are finished. Suspending an operation queue with operations that aren't finished can result in a memory leak." What do you do with the operation queue? – Guilmo Aug 18 '20 at 21:21

0 Answers0