0

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.

Below is the screenshot enter image description here

Passiondroid
  • 1,573
  • 1
  • 16
  • 28

1 Answers1

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