Quote:
Originally Posted by UnretroGamer
I want to learn to completely unload a view, for memory reasons. I notice that when I use removeFromSuperview the view is in it's same state upon return.
|
How is the view created in the first place? Normally you should create a view with alloc/init, add it to a superview (which retains it) and then release the view. That way you relinquish your ownership of the view, and the superview takes ownership. When the superview is released, it releases the subview and it gets deallocated.
If you aren't releasing the view after adding it to a superview, you probably should. If you don't, you need to put special code in that sends the view a release after removing it from it's superview.