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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:19:15+00:00 2026-06-09T20:19:15+00:00

I have an application with many views. Whenever I click the next button on

  • 0

I have an application with many views. Whenever I click the next button on the first view I present the second view. Currently I am doing this as follows:

NextView *second = [[NextView alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:second animated:YES];

In this application, however, I don’t need to keep any information from the first view any more. Is there some way I can bring up the second view, and deallocate the first view from memory? I was thinking that if I bring up 5 views in a row, and all of them are modal, then I will be using more memory that I really need. If the user hits the back button, I would also like to open the first view, and remove the second from memory.

Is there some way to do this to save memory, or is this memory just something I should not worry about?

  • 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-09T20:19:17+00:00Added an answer on June 9, 2026 at 8:19 pm

    You should definitely try to use UINavigationController. With pushViewController:animated: you push a new view controller on the stack, and you get a navigation bar with a “Back” button for free. With popToViewController:animated: you can go back to the initial view controller.

    UINavigationController is very well documented and there are lots of sample programs. I haven’t used Storyboard yet, but that should make it even simpler to build a navigation controller based sequence of views.

    You need not care about releasing the views from memory. Views are unloaded automatically if memory is low. If your view controller allocates huge amounts of additional memory, then you should implement didReceiveMemoryWarning to release that memory. See The View Controller Life Cycle for details.

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

Sidebar

Related Questions

I have an application with many views. I want only a couple of the
I have always wondered about this. So many application setups have a zip file
I have a tab bar application, with many views. Is there a way to
I have an application with many views. On each page, there is a header
I have an application that has many views (Using tab bar controller). I want
We have common views that we use in our application in many locations inside
Since I have many views, I have created sub folders under the View folder
We have a MVC3 application that we have created many small actions and views
In my MVC 2 application, I have many views with many, many input fields.
I have in my application many bitmaps. They are loaded when application start. In

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.