I'm at my wits end. I'm trying to debug a crash, and finally I manage to track it down. My 'minutesLeft' variable is somehow being released.
Problem is, I never set it to release, and the property is set to retain. I can't figure out what is going on!
Using the zombie variable, I got the following message: * -[CFNumber intValue]: message sent to deallocated instance 0x728fdd0
and tracked it down to the following line of code:
NSLog(@"MeterViewController minutesLeft %i", [minutesLeft intValue]);
The problem is when I declare the property... @property (nonatomic, retain) NSNumber *minutesLeft; So the property should be handling the retain for me!
The value is set using...
minutesLeft=[NSNumber numberWithInt:row];
and...
minutesLeft=[NSNumber numberWithInt:(((timeLeft)/60)%60)];
For dealloc and viewDidUnload I have
self.minutesLeft=nil;
but since I'm not leaving the view, those shouldn't be effecting anything.
Anyone have any ideas?