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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:27:20+00:00 2026-05-31T19:27:20+00:00

I have an object sitting in memory on the application that I’m using, and

  • 0

I have an object sitting in memory on the application that I’m using, and on a button press I do a startActivityForResult and launch the camera application, so I can attach a photo to that object. On every phone/tablet I’ve ever tested with (somewhere around 15 or so) it works completely fine, but for some reason with the Motorola Droid 3 (CDMA version) once the camera application starts, it’s like onDestroy is called… even though it returns to my app after the photograph is snapped, all of the variables held in memory are erased. Can someone direct me as to how I can fix this please?

  • 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-31T19:27:22+00:00Added an answer on May 31, 2026 at 7:27 pm

    I’m guessing what’s happening is that the camera app uses a big enough chunk of memory that android needs to destroy the paused activity. If you look at this page,

    http://developer.android.com/reference/android/app/Activity.html

    It shows that possibility pretty clearly.

    You are seeing differing behavior on different devices because different devices have different apps loaded into memory and different amounts of memory to begin with.

    If you need to save state in your app, you can hook in at onSaveInstanceState() and onRestoreInstanceState(). Here’s a post that talks about it in more detail.

    How to save an activity state using save instance state?

    In summary, don’t depend on the state being the same when you resume an activity. If you depend on that happening, you need to handle it yourself.

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

Sidebar

Related Questions

I have an application that contains methods that work with data using Entity Framework
I have an NSObject that I am using to store/hold properties of an object,
I have two tables: object that has object_id column and avalues that have object_id
I think I read somewhere that some modules only have object oriented interfaces (
I have an object that is mapped to a cookie as a serialized base-64
I have an object in a multi-threaded environment that maintains a collection of information,
I have checked using instruments and not found any memory leaks. when i check
We have a Windows Forms application that uses a (third party) ActiveX control, and
I have a memory leak issue in my application which loads a large amount
I'm writing a load-testing application in Java, and have a thread pool that executes

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.