PDA

View Full Version : UIView animation leak / memory requirement ?




chhoda
Nov 14, 2009, 12:00 PM
MyAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];

[UIView beginAnimations:@"myAnimationID" context:nil];
[UIView setAnimationDuration:1.0];

[appDelegate.window addSubview:appDelegate.viewController.view];

// configure your animation using a nice flip transition
[UIView setAnimationTransition: UIViewAnimationTransitionCurlDown forView: appDelegate.window cache: YES];

// do it!
[UIView commitAnimations];

[self.view removeFromSuperview];


I am using this animation in around 10 places in my code, and one of them occurs almost on every tap on my application. I observe, over a period of time the application is used animation starts slowing down and so.

I need to know if this is the way it has to be done or i need to do kinda cleanup stuffs, somehow

CH