Leak Canary detects memory leaks for TabLayout with ViewPager2

后端 未结 4 1339
遇见更好的自我
遇见更好的自我 2020-12-18 00:35

I followed the official documentation to setup a TabLayout with ViewPager2. I used the TabLayoutMediator this way to connect the TabLayout with the ViewPager2:



        
4条回答
  •  太阳男子
    2020-12-18 00:46

    Your mContext, being exposed by RouteActivity is lingering around even after RouteActivity is destroyed (or recreated). This is happening probably because something is using it. Track what is using mContext and stop that.

提交回复
热议问题