mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-11-14 22:17:11 +00:00
Update LeakCanary library
This commit is contained in:
@@ -14,7 +14,7 @@ class DebugApp : App() {
|
||||
initStetho()
|
||||
|
||||
// Give each object 10 seconds to be GC'ed, before LeakCanary gets nosy on it
|
||||
AppWatcher.config = AppWatcher.config.copy(watchDurationMillis = 10000)
|
||||
AppWatcher.manualInstall(this, retainedDelayMillis = 10000)
|
||||
LeakCanary.config = LeakCanary.config.copy(
|
||||
dumpHeap = PreferenceManager
|
||||
.getDefaultSharedPreferences(this).getBoolean(
|
||||
|
||||
@@ -81,7 +81,8 @@ public abstract class BaseFragment extends Fragment {
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
AppWatcher.INSTANCE.getObjectWatcher().watch(this);
|
||||
AppWatcher.INSTANCE.getObjectWatcher().expectWeaklyReachable(
|
||||
this, "Watch for leaks from destroyed fragments.");
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user