Tracking Down Memory Leaks With Memory Analyser - Multiples of Activities With Dollar Signs
I'm getting the following output when I look at the histogram for the heap dump in the eclipse memory analyser tool. There are a lot of repeats of activities and views with a dollar sign and开发者_运维问答 a number after it (e.g. SplashScreenActivity$2). Can anyone tell me what these duplicates with dollar signs are?
Dollar signs are Anonymous classes like new OnClickListener() {...}
If you access private members from your inner class, accessor methods are created, they should have dollar signs too.
精彩评论