I have a class like this:
@interface MyCollection : NSObject { NSMutableDictionary *data; }
and in the implementation of it, I have a method to init it like this:
- (id) init { if(self = [super init]) { self.data = [[NSMutableDictionary alloc] init]; } return self; }
Now when I create a object of this class in my code like this:
MyCollection *c = [[MyCollection alloc] init];
... at which point the Leaks utility shows that I have a memory leak in the init function on the very line where I try to set up the instance variable. I am totally new to Objective C & Iphone and I can't just get what is going wrong here. I have read through the Memory Management Guide and all, but I think I'm missing something pretty serious here.
Any help would be greatly appreciated. Thanks for your time already.