Skip to content
🤔 Documentation issue? Report it

//leakcanary-repo/leakcanary/FragmentAndViewModelWatcher

FragmentAndViewModelWatcher

[androidJvm]\ class FragmentAndViewModelWatcher(application: Application, deletableObjectReporter: DeletableObjectReporter) : 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 [androidJvm]
constructor(application: Application, deletableObjectReporter: DeletableObjectReporter)

Types

Name Summary
Companion [androidJvm]
object Companion

Functions

Name Summary
install [androidJvm]
open override fun install()
uninstall [androidJvm]
open override fun uninstall()