UIView animation leak / memory requirement ?

Discussion in 'iOS Programming' started by chhoda, Nov 14, 2009.

  1. macrumors 6502

    Oct 25, 2008
    	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


Share This Page