I’ve been working on the leaks in my program today and I understand most of them but this one is throwing me for a loop:
[startAndEndPoints addObject:[NSNumber numberWithInt:buttonTag]];
The Leaks instrument is pointing to this saying that it is 100% of a leak. Can anyone advise?
startAndEndPoints is a NSMutableArray.
Did you compare your situation to iphone app NSNumber memory leak ? Leaks is telling you how the leaked object got created, not where the leak is. You’re probably handing this NSNumber object off to someone else later, and that someone else is over-retaining it.