I have this snippet:
1: if ((s >= kEnumValue1) && (s <= kEnumValue2)) {
2: MyObject * o = [self findObjectFor:s];
3: if ([o isValidFor:self]) {
4: [arrayOfMyObjects removeObject:o];
5: for (MyObject * mo in arrayOfMyObjects) {
6: ...
7: }
8: }
9: }
For some really weird reason, when my code reaches line 4, if I step over, it goes back to the start of the method on the same thread, without going thru lines 5-. Does anybody have any clue why this happens?
removeObject on NSMutableArray does not mention any exception.