Can someone tell me what I'm doing wrong at the bottom of the code. I was sure that everything was in order, but the Leaks say that it is leaking, which quickly changes it to the upper version, just not sure why?
// Leaks says this is OK if([elementName isEqualToString:@"rotData-requested"]) { int myInt = [[self elementValue] intValue]; NSNumber *valueAsNumber = [NSNumber numberWithInt:myInt]; [self setRotData:valueAsNumber]; return; }
.
// Leaks says this LEAKS if([elementName isEqualToString:@"rotData-requested"]) { NSNumber *valueAsNumber = [NSNumber numberWithInt:[[self elementValue] intValue]]; [self setRotData:valueAsNumber]; return; }
Any help would be appreciated.
Gary
source share