Hi everyone i am running my code through the analyzer tool in the IDE where i am getting an indication in the dealloc and saying "incorrect decrement of the reference count of an object that is not owned at this point by caller" i am creating an NSArray and releasing properly my code sample is below
myClass.h
{
NSArray *arrayOfChapters;
}
@property (nonatomic, retain) NSArray *arrayOfChapters;
@end
myClass.m:
-(void)parseAndLoadChaptersAndPages{
self.arrayOfChapters = chapterLoader.arrayOfChapters;
}
-(void)dealloc{
[self.arrayOfChapters release];
[super dealloc];
}
can any one tell me the problem why it is giving me the warning.Thanks in advance.
[super dealloc]indealloc. Also try[arrayOfChapters release]instead of[self.arrayOfChapters release]. - user971401