I'm trying to test for memory leaks in my iphone and I'm not having much luck getting rid of this one. Here is the code that is leaking.
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)aMoc delegate:(id)aDelegate runSync:(BOOL)aRunSync {
if (self = [super init]) {
self.moc = aMoc;
self.settingsManager = [[VacaCalcSettingsManager alloc] initWithManagedObjectContext:self.moc];
self.delegate = aDelegate;
calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
self.runSync = aRunSync;
}
return self;
}
It is leaking on the self.settingsManager = [[VacaCalcSettingsManager alloc] initWithManagedObjectContext:self.moc];
line.
The self.settingManager instance variable is released in the dealloc method of the class.
I'm not sure what other information would be pertinent. Please let me know and I can provide it.
Thanks for any assistance.
-Mark
Here is the header file.
@interface VacaCalcCalculation : NSObject {
NSManagedObjectContext *moc;
VacaCalcSettingsManager *settingsManager;
id delegate;
NSCalendar *calendar;
NSDate *nextBankLimitDate;
BOOL runSync;
}
@property (nonatomic, retain) NSManagedObjectContext *moc;
@property (nonatomic, retain) VacaCalcSettingsManager *settingsManager;
@property (nonatomic, retain) id delegate;
@property (nonatomic, retain) NSCalendar *calendar;
@property (nonatomic, retain) NSDate *nextBankLimitDate;
@property (nonatomic) BOOL runSync;
- (id)initWithManagedObjectContext:(NSManagedObjectContext *)aMoc delegate:(id)aDelegate;