Interpreting eclipse memory analyzer output

I am trying to trace a memory leak in my game application. The program runs fine once, but if it starts and closes again, it will eventually run as some kind of memory error. After trying for a long time to install and understand the eclipse memory analyzer, I finally produced the data shown in the screengrab below.

My app is based on one app called SD_globals, for example:

public class SD_Globals extends Application
{
    int example_global_data = 99;
    // stuff
}

      

and five separate actions, each of which has access to many of the global data declared in SD_Globals. For example, one of the actions is SD_gameplay:

public class SD_GamePlay extends Activity implements View.OnClickListener
{
    SD_Globals gs; // gs stands for global state

    gs = ((SD_Globals)getApplicationContext());

    // now I can access global variable using code like this:
    int x = gs.example_global_data;
}

      

Looking at the data in screengrab, duplicate GamePlay instances look strange. My guess is that maybe somehow new activities are re-created every time the activity is executed without garbage collection (am I right?) ... And if so, what could be causing this?

EDIT: If I'm completely unaware of my interpretation, is there anything else that looks suspicious in the image?

enter image description here

+3


source to share


1 answer


SD_GamePlay$1

, SD_GamePlay$2

and others are not instances of the class SD_GamePlay

. They are just anonymous inner classes in the class SD_GamePlay

. SD_GamePlay$MicksPanelThing

and SD_GamePlay$MicksThreadThing

are non-anonymous inner classes of the class SD_GamePlay

.



Explanation of $ in name: fooobar.com/questions/5516 / ...

+1


source







All Articles