Skip to content

[TECHNICAL] Resource leaks in fragment bindings #4813

@joragua

Description

@joragua

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.

  1. Identify fragments where bindings are not being cleared
  2. Update those fragment using the following approach:
override fun onDestroyView() {
    super.onDestroyView()
    _binding = null
}

⚙️ Resources

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 null all bindings in onDestroyView() method
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch technical/binding_resource_leaks into master

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions