Hello, I am coming towards the end of my first iPhone app and am running the Leaks performance tool to gather information about any leaks I have in my code. However, I'm having some trouble deciphering some of the messages I am getting. For example I have a number of leaks (the majority actually) coming from NSCFNumber and pointing to lines that look like this:
The whole method looks like:
Not that all the lines are identical but they all seem to have that [NSNumber numberWithInt:] component. Is there something I'm not understanding about these types of initializations in terms of releasing something here?
Thanks in advance for any help.
Code:
[memory setObject:[NSNumber numberWithInt:word%256] forKey[NSString stringWithFormat:@"%i",address+2]];
The whole method looks like:
Code:
-(NSMutableDictionary*)putword:(NSMutableDictionary *)memory atAddress:(int )address withWord:(int )word
{
[memory setObject:[NSNumber numberWithInt:word%256] forKey:[NSString stringWithFormat:@"%i",address]];
word=word/256;
[memory setObject:[NSNumber numberWithInt:word%256] forKey:[NSString stringWithFormat:@"%i",address+1]];
word=word/256;
[memory setObject:[NSNumber numberWithInt:word%256] forKey:[NSString stringWithFormat:@"%i",address+2]];
word=word/256;
[memory setObject:[NSNumber numberWithInt:word%256] forKey:[NSString stringWithFormat:@"%i",address+3]];
return memory;
}
Thanks in advance for any help.