Skip to content

Commit

Permalink
Fix more leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
natario1 committed Mar 4, 2019
1 parent d940a28 commit 3a91345
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ public final class Adapter private constructor(
it.unbind(this)
}
recyclerViews.clear()
lifecycle.removeObserver(this)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ abstract class DataBindingPresenter<T: Any, DB: ViewDataBinding>(
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
fun onDestroy() {
binding.setLifecycleOwner(null)
lifecycle.removeObserver(this)
}
})
return holder
Expand Down

0 comments on commit 3a91345

Please sign in to comment.