I am trying to find out the exact reason for this leak but still not able to figure out why this leak has happened as ForeignMoviesFragment instance is not hold anywhere. Need help.
Asked
Active
Viewed 618 times
1 Answers
0
ForeignMoviesFragment$1
is an anonymous inner class within ForeignMoviesFragment
. Non-static inner classes have an implicit reference to the outer-class. If the anonymous class is passed & held by a class whose lifecycle is greater than the Fragment's, then it will leak

Joshua Ong
- 26
- 2
-
Yes, i figured about the inner class. It was actually a listener that i implemented using inner class. Now i changed it into a class and then unregistered it in onDestroy – Passiondroid Nov 02 '17 at 20:01