Closed creati8e closed 4 years ago
This should be handled by the same container that owns the Adapter. Most likely in the onDestroy()
method of an Activity or Fragment
Why is this a leak? The adapter is inside, and the RecyclerView holds it as usual. If the RecyclerView isn't attached, there is no more reference to it, so it can be GC-d , no?
To fix crash you need to make following changes: