mirror of
https://github.com/suhan-paradkar/Instabar.git
synced 2023-08-02 15:02:12 +02:00
Fix memory leak
This commit is contained in:
parent
5832e746f0
commit
86b75c136e
@ -132,6 +132,13 @@ class StoryViewerFragment : Fragment() {
|
||||
return root
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
if (root != null) {
|
||||
root = null
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
if (!shouldRefresh) return
|
||||
init()
|
||||
@ -910,4 +917,4 @@ class StoryViewerFragment : Fragment() {
|
||||
.setNegativeButton(R.string.no, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -549,6 +549,7 @@ public class DirectMessageThreadFragment extends Fragment implements DirectReact
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
cleanup();
|
||||
binding = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -278,6 +278,15 @@ public class FeedFragment extends Fragment implements SwipeRefreshLayout.OnRefre
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (root != null) {
|
||||
root = null;
|
||||
binding = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull final View view, @Nullable final Bundle savedInstanceState) {
|
||||
if (!shouldRefresh) return;
|
||||
|
@ -1011,4 +1011,4 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall
|
||||
}
|
||||
fragment.show(childFragmentManager, PostsLayoutPreferencesDialogFragment::class.java.simpleName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user