Skip to content
🤔 Documentation issue? Report it

//leakcanary/leakcanary/FragmentAndViewModelWatcher

FragmentAndViewModelWatcher

class FragmentAndViewModelWatcher(application: Application, reachabilityWatcher: ReachabilityWatcher) : 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.

Constructors

FragmentAndViewModelWatcher fun FragmentAndViewModelWatcher(application: Application, reachabilityWatcher: ReachabilityWatcher)

Types

Name Summary
Companion object Companion

Functions

Name Summary
install open override fun install()
uninstall open override fun uninstall()