@Override protected void setupLeakCanary() { InstrumentationLeakDetector.instrumentationRefWatcher(this) .buildAndInstall(); } }
@Override public void onCreate() { super.onCreate(); InstrumentationLeakDetector.instrumentationRefWatcher(this) .buildAndInstall(); } }
/** * Creates a {@link RefWatcher} that works out of the box, and starts watching activity * references (on ICS+). */ public static @NonNull RefWatcher install(@NonNull Application application) { return refWatcher(application).listenerServiceClass(DisplayLeakService.class) .excludedRefs(AndroidExcludedRefs.createAppDefaults().build()) .buildAndInstall(); }
@Override public void onCreate() { super.onCreate(); InstrumentationLeakDetector.instrumentationRefWatcher(this) .buildAndInstall(); } }