I must have tried over a dozen incarnations of this code. And looked at +100 answers. IT SHOULD BE so simple. A real basic animation, (using IB this time) but ALWAYS shows a memory leak. NO matter where I put my nil, my release, tried a zillion combinations.
// implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
NSLog(@">>> Entering %s <<<", __PRETTY_FUNCTION__);
myView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"1.png"],
[UIImage imageNamed:@"2.png"],
[UIImage imageNamed:@"3.png"],
[UIImage imageNamed:@"4.png"],nil];
myView.animationDuration = 1.0;
myView.animationRepeatCount = 0;
[myView startAnimating];
[myView release];
myView = nil;
[myView.animationImages release];
NSLog(@">>> Leaving %s <<<", __PRETTY_FUNCTION__);
}