346 - NSFileManager *fileManager = [[NSFileManager alloc] init];
347 - [fileManager removeItemAtPath:[mediaSource.newMediaToDelete objectAtIndex:i] error:nil];
348 - [fileManager release];
The error points towards line 348 and says:
‘Potential leak of an object allocated on line 347’
I don’t understand this, obviously line 347 isn’t an allocation, and the allocation on line 346 is already released.
Avoid using the ‘new’ or ‘create’ in your own method names (unless they return objects that are not autoreleased I guess). It confuses the static analyser. I’ve had this issue and found it went away when I changed my method name.
Update: I see Bavarious has already noted this in the comments.