RecyclerView MemoryLeak-漏金丝雀

时间:2019-03-14 16:29:18

标签: android android-recyclerview memory-leaks leakcanary

在显示以下内容的地方,我有以下LeakCanary:

enter image description here

日志:

  
      
  • .ui.flows.channelsflow.ChannelsFragment的实例|静态$ classOverhead =字节[764] @ 328963209(0x139b9489)|
      channelListAdapter = .ui.flows.ChannelListAdapter @ 332876376   (0x13d74a58)| channelListArray = java.util.ArrayList@332876416   (0x13d74a80)| channelListView =   im.ene.toro.widget.Container@332876440(0x13d74a98)|
      clickedChannelObject = null | firstVisibleItem = 0 | globalHelpers   = .managers.GlobalHelpers @ 316374608(0x12db7e50)| gridLayoutManager = android.support.v7.widget.GridLayoutManager@332877360(0x13d74e30)|加载=假| mainViewModel = .ui.flows.MainViewModel @ 328888104   (0x139a6f28)| playlistListView =   android.support.v7.widget.RecyclerView@332877496(0x13d74eb8)|
      播放列表= java.util.ArrayList@332878360(0x13d75218)|
      playlistsAdapter = PublicPlaylistsAdapter @ 332878384(0x13d75230)|
      reportAlert = .ui.flows.ReportAlert @ 332878416(0x13d75250)| rxBus =   .rxkotlin.RxBus @ 316376312(0x12db84f8)| sharedPreferencesManager =   .managers.SharedPreferencesManager @ 328888696(0x139a7178)|
      totalItemCount = 22 | userSavedSubscription =   io.reactivex.disposables.CompositeDisposable@332878520(0x13d752b8)|   viewModel = .ui.flows.channelsflow.ChannelsViewModel @ 332878536   (0x13d752c8)| viewModelFactory =-   viewmodel.ViewModelFactory@316377792(0x12db8ac0)| visibleItemCount   = 4 | visibleThreshold = 5 | _ $ _ findViewCache = null
  •   

xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <im.ene.toro.widget.Container
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="4dp"
        android:layout_weight="1" />


    <android.support.v7.widget.RecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="4dp"
        app:elevation="@dimen/primary_text_large"
        android:layout_weight="2" />

</LinearLayout>

0 个答案:

没有答案