I have an animation block where I move the UIView away from the screen.
In the completion block I am releasing objects that held that UIView and it’s subviews.
Is this acceptable to do?
I have an animation block where I move the UIView away from the screen.
Share
As a general rule: If you’re careful, this won’t have unexpected complications; it’s a perfectly understandable thing to do in a completion block.
In your situation: Make sure you’re not going to overrelease things. Without being able to see the code, I’m not sure when you’re doing this in relation to a view’s lifecycle. Make sure you understand the processes undertaken when a UIView is destroyed. It would certainly be worth reading: http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ViewLoadingandUnloading/ViewLoadingandUnloading.html