I analyzed a heap dump to find out why some multiple instances of a certain class are still in memory even after their purpose is over. What I found out is that the only reference to each instance is the object itself.
ScheduleWindow#1 has 'this$0 in ScheduleWindow$1#1' as the only reference.
ScheduleWindow#2 has 'this$0 in ScheduleWindow$1#2' as the only reference.
ScheduleWindow#3 has 'this$0 in ScheduleWindow$1#3' as the only reference.
...
What does it mean to have references like this? ScheduleWindow is not an inner class either.
P.S. Please bear with me for not posting the actual code because I can't post the actual code due to legal reasons.