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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:16:51+00:00 2026-05-29T11:16:51+00:00

When my application became sophisticated and main activity started holding in memory a lot

  • 0

When my application became sophisticated and main activity started holding in memory a lot of data (loaded and parsed from files in response to user actions) I have (mistakenly) switched from onSaveInstanceState to onRetainNonConfigurationInstance without noticing that onRetainNonConfigurationInstance is not called when application is killed to save device memory. So as now I has to switch back to onSaveInstanceState I want to as what is the proper way to handle a huge amount of data distributed by tens of objects? Do I have to implement serialization for all these objects (Parcelable?) or may be put all the data into Service thread hoping it would not be killed? What is the best practice?

  • 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-29T11:16:51+00:00Added an answer on May 29, 2026 at 11:16 am

    I’ve ended with an ugly but the only acceptable solution:

    1. I’ve moved all the data into Application object.
    2. I’ve created a foreground Service so that application object will not be killed even if all activities are killed.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying my first flex application. And have a problems adding data from
I want to upload some data from an Android application to Pachube. [Update: For
i developed application with map service and webservices when i run application its became
In my C# application I have an option dialog that can be opened from
I am switching to PostgreSQL from SQLite for a typical Rails application. The problem
For some reason the viewstate of my application became gigantic (around 14 million characters).
I recently became quite interested in developing an adobe air application, and just had
We are attempting to port a legacy application from an old monolithic RTOS to
I have recently became familiar with C# application settings, and it seems cool. I
I have a javascript portal-like application (based on JPolite), when modules are loaded with

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.