Skip to content

Commit

Permalink
Prevent another leak in Fragments with progress views
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Sep 11, 2016
1 parent 83ffcec commit 4b07158
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ abstract class EasyLoadingFragment<T> : LoadingFragment<T>() {
}
}

override fun onDestroy() {
progress.setOnRefreshListener(null)

super.onDestroy()
}

override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ abstract class EasyPagingFragment<T, C : PagingAdapterCallback<T>> :

override fun onDestroy() {
adapter.callback = null
progress.setOnRefreshListener(null)

super.onDestroy()
}
Expand Down

0 comments on commit 4b07158

Please sign in to comment.