I have a lot of objects named _Obj_1
, _Obj_2
, etc...
And I want to release all.
I'm using KVC. In particular to release all, i use:
MyClass *obj = nil;
for ( int i=1 ; i<=14; i++ ) {
obj = [self valueForKeyPath:[NSString stringWithFormat:@"_Obj_%d", i]];
[obj release];
}
clang analyzer tell me for [obj release];
Incorrect decrement of the reference count of an object that is not owned at this point by the caller?
How can I fix it?
It's not an ARC project.