Releasing views
I am also new to Mac programming, so someone else jump in if I'm wrong.
I believe that views are retained when they are added as subviews and released with the superview is finished with them. So you don't need to release them explicitly, unless you've retained them somewhere.
But the memory management issue is to be sure you clean up any resources that the view holds. I don't know if this is the commonly accepted pattern, but I ensure that everything that was allocated by the view (and not released immediately) is released in the
dealloc method of the view.
Then, of course, there is just the normal cascading deallocation. Ensure that all of your classes implement dealloc and are releasing their resources when they are released (if they can't release them sooner).
So when the view is deallocated, it releases any resources that it is responsible for but hasn't yet released, those resources then release anything they were retaining, etc.
Again, I'm new, but when I run Leaks against my app, I'm not leaking much in the way of resources. (I do have a couple small leaks to track down.
)