Why isn't view released after adding to window?


I’m puzzled why the view that has been created in applicaton:didFinishLaunchingWithOptions: isn’t released after it has been added as a subview to the window


Is view an instance variable of the app delegate? Then it makes sense not to release it, because both the window and the app delegate have a pointer to the view, and thus it should have a retain count of 2.


Ahhh OK I see, it’s because we’re needing to keep “view” around as an instance variable so it can be used later on in “viewForZoomingInScrollView”.

I think it would be useful to add that information to the “retain count trivia” paragraph because it doesn’t seem clear enough why we’re retaining a pointer to the view.