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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:01:43+00:00 2026-05-23T19:01:43+00:00

When i am put my application to the background and again awake it means

  • 0

When i am put my application to the background and again awake it means all the Global variables are cleared.This is not happening always but at rare case only.I guess that could be memory crash only.Why global values are cleared? how to recover from this?

  • 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-23T19:01:45+00:00Added an answer on May 23, 2026 at 7:01 pm

    This might be the way Android works. Just because you close your last activity in your application doesn’t mean that your application is cleared from memory. If Android doesn’t need the memory space taken up by your application it won’t necessarily be killed right away by Android. Also the garbage collector has it’s own life cycle which doesn’t necessarily get triggered on each activity destroy.

    You can try this: Start Angry Birds and start playing around, fire off some “crazy chickins”. Press the home button in the middle of an ongoing game and start Angry Birds directly again. Notice how you end up on the very same level you just “home-ed” out from. Press the home button again and start another application (the browser is usually memory hungry). After some time start Angry Birds again and notice how you’ll have to go through the entire start up sequence again (i.e. you don’t necessarily end up in the middle of the game, on the level you previously left).

    If you really, really need to maintain application state, regardless of GC run or no-run, you should probably use SharedPreferences or a SQLite database. You can read up more on these concepts here: http://developer.android.com/guide/topics/data/data-storage.html

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

Sidebar

Related Questions

When I get this: - (void)applicationWillResignActive:(UIApplication *)application { I release all my objects and
Currently, I'm using this to show my application background as phone wallpaper. getWindow().setFlags(WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER, WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER);
How can I tell that my application has been put in the background (i.e.
I have a folder inside my ASP.NET web application. I put all css files
In my application, I'd like to keep status bar but make its background be
Our application starts several background processes and put their output into TextBoxes - each
When my application goes to background , my (static and singleton) objects are cleared.
I'm going to put a background on my embedded console application. The question is
Background I'm building a web application for a client. This app will be accessible
Rep steps: create example .NET form application put a TextBox on the form wire

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.