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 8121301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:26:39+00:00 2026-06-06T05:26:39+00:00

As a newcomer to iOS, I found that ARC has thus far really helped

  • 0

As a newcomer to iOS, I found that ARC has thus far really helped with rapid development. That being said, there are a few caveats where I am unsure how ARC fits and with previous longstanding iOS patterns, such as MVC. Here’s how I’m trying to picture things, and any clarification or corrections in my understanding would be greatly appreciated.

I’m using Storyboard to instantiate and setup some view controllers for my app. From the docs I’ve read, when the active view controller segues to a different view controller, the sending view controllers instance variables are lost (yes?/no?). As such, I’m using a model layer to store data for the app. Now here wheres my understanding starts to get (more) fuzzy..

Say I have a model data object in use by only one view controller. I allocate and instantiate the data object from within the view controller (in viewDidLoad). So now I have a reference to the data object from within my controller and while the controller is in the foreground, can freely coordinate information from views, to the controller, possibly to the data object, back to the controller to update the views using the MVC pattern. OK, cool..

But when I segue to a different view controller, the sender controller’s instance variables are lost and thus the only reference to the data object is lost. Does ARC then automatically release the data object too?

My goal is to be able to save data for a particular view controller so that when I return to it I can update it with the saved state. How is this done with MVC and ARC in iOS? Options I’ve thought of (remember, I’m new lol)

  1. Include a reference to the data object in the Application Delegate. It’s not going anywhere so the reference to the data object won’t either. Is this good precise?
  2. Store all data in static form in the data class object?
  3. Use NSUserDefaults

Any advice would be greatly appreciated going forward. Thanks for your time.

  • 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-06-06T05:26:41+00:00Added an answer on June 6, 2026 at 5:26 am

    If you’re using, for example, a push or modal segue, the view controller of the previous view is not released. If you ever receive a didReceiveMemoryWarning, the view, itself might be released, but the controller will not. You controller’s ivars will be preserved, so when the secondary view controller is popped off (or dismissed), your original ivars will be as they were before.

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

Sidebar

Related Questions

I am a Javascript/jQuery/Prototype newcomer and I have a page that has a Prototype
I am a newcomer to Maven, and I was wondering if there was a
I'm a newcomer to Caliburn.Micro and there are a few things I'm still not
I'm a newcomer to PDO and have to say that I like it so
I'm a newcomer to Rails. I want to build a simple form that determines
I'm a newcomer to Python but I understand that things should not be done
I'm a newcomer to subversion. Recently, I've done some development in two different branches,
I'm a newcomer of OOP, so I has one silly question about when a
Please consider that im a newcomer to c#. After scanning about 700 posts i
before I start you should know that I am a bloody newcomer when it

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.