hey guys!
i have got the following problem: with a timer i call the function draw repeatly (in the timer runLoop function) and found out, that the following commands will increase the memory usage permanently:
Code:
NSNumber *n = [NSNumber numberWithFloat:self.number];
shouldn't this be autoreleased?
Code:
NSString *num = [formatter stringFromNumber:n]];
here formatter is a NSNumberFormatter, initialized in init
Code:
self.drawView.frame = CGRectMake(self.x, self.y, self.width, self.height);
a CGRect is only a structure, right? why is this allocating memory constantly?
i also tried to add a NSAutoReleasePool to the timer function, but that is also not working. furthermore, i tried to alloc the NSString and release it again at the end of the function, but that didn't help.
thanks in advice
xash