-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Description
Currently, not all existing fragments are properly clearing their view bindings when the view is destroyed. This can lead to memory/resource leaks, especially in cases where the fragment lifecycle outlives its view lifecycle.
- Identify fragments where bindings are not being cleared
- Update those fragment using the following approach:
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
⚙️ Resources
- https://developer.android.com/topic/libraries/view-binding
- https://proandroiddev.com/avoiding-memory-leaks-when-using-data-binding-and-view-binding-3b91d571c150
Important
Don't forget to follow all comments described in the issue: branch name, defined approach...
TASKS
- Research (if needed)
- Create branch technical/binding_resource_leaks
- Development tasks
- Set to
nullall bindings inonDestroyView()method
- Set to
- Code review and apply changes requested
- Design test plan
- QA
- Merge branch technical/binding_resource_leaks into master
Reactions are currently unavailable