I have objects that extends NSOperation. I also have NSOperationQueue.
I have a timer that NSLogs operationCount property of that NSOperationQueue every 0.5 seconds.
I add new operations to queue and after all of them are finished, queue logs 0 just as expected.
Problem is that Instruments reports that there are still living NSOperation objects living.
I hold no references to NSOperation, I only alloc-init them and add them to the queue.
The number of living NSOperation objects is 11 (???) in Instruments. If I add 5 new operations, NSLog logs 5... 4.... 3.... 2 .... 1... 0. And instruments are behaving like: 16, 15, 14, 13, 12, 11 ...
Any clue on this?
I could KVO isFinished property and set to nil, but I am I wonder why are those objects still alive.
NSOperation
here), that should show a list of all the instances of that class. Then click on the instance you want, and bam, here is the list of each retain/release call. You should be able to determine which one is too much ;) – F.X.