I am stuck trying to analyze why Xcode analyzer (v4.2) complaints that my objective-c code leaks memory. I am creating a NSOperation that 1) recursively creates a directory if it does not exists, 2) copies a file from one directory to another into that directory.
The NSOperation is initialized with:
- (id)initWithFullPathSource:(NSString *) mysource andFullPathCopy:(NSString *) mycopy andNewDirectory:(NSString *) mydir withMode:(NSString *) mymode withLR:(NSString *) LR
{
self = [super init];
if (self) {
[self setFullPathSource:mysource];
[self setFullPathCopy:mycopy];
[self setNewDirectory:mydir];
[self setMode:mymode];
[self setMyLR:LR];
}
return self;
}
Attached is a screenshot of how Xcode analyzer sees my code. Could anyone please help me understand why I am leaking memory in this case? I am releasing 'createComponents' and 'removeComponents' at the end of the main routine so I thought I was in the clear.
Hope someone can shed some light on my problem. Thanks! Cheers, Trond