I have two related questions concerning NSAutoreleasePool.
Between declaring the pool and draining it, can I use animation? Example
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; subView.alpha = 0.10; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1.0]; [UIView setAnimationDelegate:self]; [UIView setAnimationRepeatCount:1]; subView.alpha = 1.0; [UIView commitAnimations]; [pool drain];
If I alloc something after the pool is declared, do I release it before drain? After drain? Or not at all?
Edit: Code formatting is refusing to work for some reason. Could a mod please try to format the code above?