Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6092243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:25:11+00:00 2026-05-23T12:25:11+00:00

The answers here all say that pushViewController retains the given viewController but they don’t

  • 0

The answers here all say that pushViewController retains the given viewController but they don’t refer to a document that states this.

Question is how do they know that pushViewController will retain the given view controller? Can we assume that this convention is adhered to by all other classes that take your NSObject* derived object pointer?

Edit:

I need a stronger argument/proof than what the currently presented answers propose. For example the documentation about UIView::addSubview clearly states ‘This view is retained by the receiver’. Alternatively, if you intend to show that the received controller is retained by implication because the UINavigationController has the same semantics as a collection class, then show that it does, by showing that it uses one of the collection classes internally or referencing some documentation that states this. The documentation for pushViewController says that the given view controller is placed on the ‘navigation stack’ but nowhere does it say what class this stack is. In fact, looking at the definition in the header file of the UINavigationController, it looks like it’s not using a stack, but using NSMutableArray. If you’ve done a math’s degree and written proofs then you’ll understand the sort of intellectual rigor I’m looking for.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:25:12+00:00Added an answer on May 23, 2026 at 12:25 pm

    Because collections always own their items, and parents always own their children.

    In a sense, the navigation controller is operating like a type of collection – a stack.

    If the controller up and disappeared on the navigation controller – that would be a big problem.

    http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html#//apple_ref/doc/uid/TP40004447-SW1

    When you add an object to a collection
    (such as an array, dictionary, or
    set), the collection takes ownership
    of it. The collection will relinquish
    ownership when the object is removed
    from the collection or when the
    collection is itself released.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I always believe they did, but seeing some answers here make me doubt... Can
I see this question here on SO but I am not sure that answers
First of all let me say thank you to everyone that offered answers...I have
I asked a similar question here a while back but all the answers were
A similar question was asked here , but the answers generally all seem to
edit: many thanks for all the answers. Here are the results after applying the
I know I can get answers here but I was wondering if anyone knows
I had learnt by reading your great answers here, that it is not good
When I read some of the answers on here I notice that some people
I've read a few answers on here that condemn the use of svn:externals. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.