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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:34:35+00:00 2026-06-09T21:34:35+00:00

I have an application where there are a few view controllers on top of

  • 0

I have an application where there are a few view controllers on top of each other before the final stage where the user “saves” all the data he has entered in the stages. During the entering data phase, the user is allowed to go back and change some of the data. However I want to release some of the data structures because they consume a lot of memory. I can’t release it during viewdidunload because it only gets called when the device is low on memory. I also can’t release it in viewDidDisappear because the data wouldn’t be there if the user wants to go back and change stuff.

I think the way to do this is to set up a pointer of the viewcontrollers to the previous viewcontrollers and then call a release function on the pointer to the previous viewcontroller to release stuff.

How do I do this?

I think I put something like

#import "SomeViewController.h"

@property SomeViewController someViewController;

in the .h file? I am not sure where to go from here.

  • 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-09T21:34:36+00:00Added an answer on June 9, 2026 at 9:34 pm

    If you are using too much memory, the system will handle that for you, in a more efficient manner that any DIY system. That’s why memory warnings, ARC, pools and all the other good stuff is there in the first place. So I would advise against what you’re trying to accomplish, and just handle the memorywarnings accordingly.
    By the way, note that it’s not a good practice to store data in your viewControllers, you should instead keep your data sctructures in separate objects (as MVC suggests). You can for instance keep your data in a singleton object, that you can access from every view controller, in this way you can also release the memory that you no longer need, whithout keeping pointers to all the VC’s chain.

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

Sidebar

Related Questions

I have developed a few applications now all using single view controllers. In each
I have an application that's locked down using forms authentication. There are few nightly
i have inherited a database application from someone else and there are a few
In my C# 3.5 Windows Forms application, I have a few SplitContainers. There is
I have an application where there are two types of user currently, Admin and
I have an application with a few tabs which all belong to the same
I have an application where there are multiple processes. They share the reading and
I have a asp.net application.there is a databinding section to a datagrid.But there have
I have an application in which there is a form which I want to
I have a grid in my GWT application there are columns and rows which

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.