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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:23:01+00:00 2026-06-01T06:23:01+00:00

So, I tested my game out for the first time with the Monkey test.

  • 0

So, I tested my game out for the first time with the Monkey test. I managed to go about 3 minutes without a crash, but I ended up crashing with an out of memory error, and I’m trying to figure out how I might make it better.

My program is structured as follows:

  • There is a front screen which will start an activity.
  • The secondary activity is where most of the action is, and also where I crashed.
  • I crash on an inflate command
  • My game forces portrait mode, it was easier to make 1 layout than 2 work…
  • There are a number of class variables associated with my secondary activity. I’ll include the non-static ones below. I’ve also included some kind of a clue for those things which aren’t obvious as to what they are.

What I’m wanting to know is how I can improve the memory management of my program so it won’t crash. I suspect that I need to manually delete some of these variables, but I’m not sure what the right place to do so is. Thanks!

private Level_Score_bar score_bar; // Custom view
private number_viewer num_viewer; // Custom view
private number_pad num_pad;       // Custom View
private int time,score,level,num_remaining,current_var,change_loc,time_remaining;
private ArrayList<Integer> the_key;
private ImageView Number_to_select;
private Boolean update_viewer; 
Random rseed;
Vibrator bzzz;
long ctime;
private Activity self=this;

private SharedPreferences prefs;
private Editor prefs_edit;

The out of memory occurred

   setContentView(R.layout.level_layout);

This layout is rather complex, containing several image views, buttons, text views, etc.

  • 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-01T06:23:03+00:00Added an answer on June 1, 2026 at 6:23 am

    It sounds like you need to check out the “Allocation Tracker” tool, which is available in the “DDMS’ Perspective in eclipse.

    This will show you exactly which data structures are consuming memory.

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

Sidebar

Related Questions

i created a game and released it, but really only tested it on phones
I tested: rm \-\-remove-files but I am unable to remove it. How can I
i tested HttpResponse#flushBuffer and PrintWriter#flush on Tomcat 7 below, but it seemed that the
I tested each statement on its own and it works, but when I use
I've tested my iPhone app on the iPhone. Now I want to test it
I've tested in Chrome, do I need to test in Safari?
I've built my first XNA game and when I go to the build folder
I'm developing a game. So far I tested it on different phones and it
If you are writing a game you should think about cheaters and how to
I've written a game for Android, and I've tested it on the Dev Phone

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.