RecyclerView MemoryLeak - утечка канарейка - PullRequest
0 голосов
/ 14 марта 2019

У меня есть следующий LeakCanary, где кажется, что:

enter image description here

log:

  • Экземпляр .ui.flows.channelsflow.ChannelsFragment | static $ classOverhead = byte [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) | loading = false | mainViewModel = .ui.flows.MainViewModel @ 328888104 (0x139a6f28) | playlistListView = android.support.v7.widget.RecyclerView@332877496 (0x13d74eb8) |
    playlists = 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>
...