Package 

Class FragmentAndViewModelWatcher

  • All Implemented Interfaces:
    leakcanary.InstallableWatcher

    
    public final class FragmentAndViewModelWatcher
     implements InstallableWatcher
                        

    Expects:

    • Fragments (Support Library, Android X and AOSP) to become weakly reachable soon after they receive the Fragment#onDestroy() callback.

    • Fragment views (Support Library, Android X and AOSP) to become weakly reachable soon after fragments receive the Fragment#onDestroyView() callback.

    • Android X view models (both activity and fragment view models) to become weakly reachable soon after they received the ViewModel#onCleared() callback.

    • Method Summary

      Modifier and Type Method Description
      Unit install()
      Unit uninstall()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FragmentAndViewModelWatcher

        FragmentAndViewModelWatcher(Application application, DeletableObjectReporter deletableObjectReporter)