Possible Duplicate:
Why is object not dealloc'ed when using ARC + NSZombieEnabled
I must be doing something wrong here. Compiler is set to Apple LLVM Compiler 3.0 and Objective-C Automatic Reference Counting is set to YES. I also have 3rd Party Software included that requires ARC to be active.
So my basic problem is that my properties don't get released. I have the following header:
@interface ArchiveController : UIViewController <CloseSubviewDelegate> {
NSArray *journals;
NSMutableArray *archiveViews;
}
@property (nonatomic, strong) NSArray *journals;
@property (nonatomic, strong) NSMutableArray *archiveViews;
....
@end
I synthesized those and initialize the archiveViews array like this:
self.archiveViews = [NSMutableArray array];
later I add objects to it, everything works fine; same for the journals array.
I added a dealloc method to check that the ArchiveController gets released:
-(void)dealloc
{
DLog(@"dealloc archive controller");
}
which works, but the arrays are never released; Why? If I change the dealloc method to this:
-(void)dealloc
{
DLog(@"dealloc archive controller");
self.archiveViews = nil;
}
everything works fine, but thats not the way it should be, right? I'm a 100 % certain that the array and its objects aren't referenced anywhere else.
And isn't the Preprocessor supposed to handle the insertion of all the retains/releases/deallocs? when I let Xcode generate preprocessed output, nothing seems changed!