在课程的最后,美元符号在Eclipse MAT中意味着什么? [英] What does the dollar sign at the end of a class mean in Eclipse MAT?

查看:140
本文介绍了在课程的最后,美元符号在Eclipse MAT中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse MAT尝试跟踪Android中的资源泄漏(如果您改变了屏幕方向的情况很多),当我进入直方图视图时,我看到我的活动与一次又一次列出的相同活动一起列出后面跟着一个美元.

I am using Eclipse MAT to try and track down a resource leak in Android (if you change screen orientation a lot) and when I go to the histogram view, I see my activity listed along with the same activity listed again and again with a $ after it.

像这样:

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

只是想知道$ 1,$ 2和$ 3是什么意思...

Just wondering what the $1, $2 and $3 means...

tia.

推荐答案

它们是匿名内部类.

例如:

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

在此示例中,匿名内部类是View.OnClickListener的子类.

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

这篇关于在课程的最后,美元符号在Eclipse MAT中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆