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

  • Home
  • SEARCH
  • 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 4337294
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:55:28+00:00 2026-05-21T10:55:28+00:00

There are a few instances where my app crashes when turned back on from

  • 0

There are a few instances where my app crashes when turned back on from sleep and the app is still open. It happens if a UITableViews is open when the iPhone is put into sleep; the table is being filled from an XML being parsed. I understand why it is crashing; in my viewDidUnload method I am releasing the array that is filling the table. How to handle this I am not sure; yes I could simply not release it in viewDidUnload, but then it would never leave memory if you returned to the main menu.

Any help would be appreciated!

  • 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-21T10:55:29+00:00Added an answer on May 21, 2026 at 10:55 am

    The method viewDidUnload is not the right place to release your data if at all. I quote Apple’s documentation, which desribes it better than I could:

    This method is called as a counterpart
    to the viewDidLoad method. It is
    called during low-memory conditions
    when the view controller needs to
    release its view and any objects
    associated with that view to free up
    memory. Because view controllers often
    store references to views and other
    view-related objects, you should use
    this method to relinquish ownership in
    those objects so that the memory for
    them can be reclaimed. You should do
    this only for objects that you can
    easily recreate later, either in your
    viewDidLoad method or from other parts
    of your application. You should not
    use this method to release user data

    or any other information that cannot
    be easily recreated.

    ViewDidUnload is used only to release view related objects. A view controller can release its view because its not shown, still your instance of that controller exists and so does your model.

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

Sidebar

Related Questions

I know how to use locks in my app, but there still few things
In django-social-auth , there are a few instances where a back-end will raise a
There are a few things that I almost always do when I put a
There are a few APIs for grabbing the address book/contact list from the major
I am having few queries regarding heap usage in my app. At instances it
It looks like there a few working solutions for using custom true type fonts
There are a few ways to get class-like behavior in javascript, the most common
There are a few books about specific ORM products such as Hibernate or Linq
There are a few questions on SO already regarding LINQ pivots and while a
There are a few questions about configuring Apache for local development, such as this

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.