I have a class, that basically manages core data. inserts deletes and updates data. I initialize this class like so
- (id)init
{
self = [super init];
if (self) {
self.itemList = [NSDictionary dictionaryWithObjectsAndKeys: // <== LEAKS
ITEMURL1, KEY1,
ITEMURL2, KEY2,
ITEMURL3, KEY3,
ITEMURL4, KEY4,
ITEMURL5, KEY5,
nil];
self.storedItems = [[NSMutableArray alloc] init]; // <== LEAKS
}
return self;
}
- (void)dealloc {
[storedItems release];
[super dealloc];
}
I have taken care that I release every object carefully. whenever it is allocated, But I still seem to get leaks at init when I run the app in Instruments.
what is going on? am I doing something wrong?