This is an example of how memory leaks happen with fragments in Android. It also has a solution to the problem.
An in-depth explanation of this issue is posted on this article https://medium.com/@maxkohne/memory-leaks-with-fragments-in-android-6664d1fd8e73