Yes, if you create a view like this:
UIView *myView = [[UIView alloc] init];
The retain count is 1 and you are the owner.
If you add this view to another view, the second view will be the owner of it, and will increase the count, so you need to release:
[mySecondView addSubView:myView];
[myView release];
Now, if you want to remove that view, you do:
[myView removeFromSuperView];
And your view will be completely released cause removeFromSuperView decrement the count.
So, summarizing:
- alloc and addSubView will increase your count by 1 each
- release and removeFromSuperview will decrement your count by 1 each