From fdf0d8e9c84b5bf40719811f8ffd215284f70c6d Mon Sep 17 00:00:00 2001 From: Ritvik Saraf <13ritvik@gmail.com> Date: Tue, 12 Mar 2019 06:07:56 +0530 Subject: [PATCH] fixed memory leak --- .../main/java/org/schabi/newpipe/fragments/MainFragment.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java index 894d62ecd..5c5fd8635 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/MainFragment.java @@ -111,6 +111,8 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte public void onDestroy() { super.onDestroy(); tabsManager.unsetSavedTabsListener(); + pagerAdapter = null; + viewPager.setAdapter(pagerAdapter); } /*//////////////////////////////////////////////////////////////////////////