What does the dollar sign mean at the end of a class in an Eclipse MAT?

I use the Eclipse MAT to try to find a resource leak in Android (if you change the orientation of the screen drastically), and when I go to view the histogram, I see that my activity is indicated along with the same activity that is indicated again and again with $ after him.

So how:

com.test.TestActivity com.test.TestActivity$1 com.test.TestActivity$2 com.test.TestActivity$3 

Just wondering what $ 1, $ 2 and $ 3 mean ...

TIA.

+7
source share
1 answer

These are anonymous inner classes.

For example:

 Button button = (Button) findViewById(R.id.Button); button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // ... } }); 

In this example, the anonymous inner class is a subclass of View.OnClickListener .

+12
source

All Articles