You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TECHNICAL] Resource leaks in fragment bindings #4813
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
}
Task 1. Research:
I found 10 fragments have _binding but never set it to null in onDestroyView(), causing memory leaks when the view is destroyed but the fragment instance survives.
Comment task follow up: Branch name: technical/binding_resource_leaks Set to null all bindings in onDestroyView() method:Done Design Test plan:
Manual testing done, reached the fragments via manual testing:
SpaceMembersFragment Spaces → select a space → Members
SpacesListFragment Spaces tab
SetSpaceIconDialogFragment Spaces → edit space → set icon
CreateSpaceDialogFragment Spaces → create new space
AddMemberFragment Spaces → Members → Add member
RemoveFilesDialogFragment Select file(s) → Delete
MainEmptyListFragment Open an empty folder
CreateShortcutDialogFragment Create shortcut action
FileDetailsFragment Tap a file → file details
SharesFragment File details → Shares tab
Activity
corevibe555 commentedon Mar 31, 2026
@joragua I would love to work on this.
Task 1. Research:
I found 10 fragments have _binding but never set it to null in onDestroyView(), causing memory leaks when the view is destroyed but the fragment instance survives.
Fragments That Need Fixing:
Each fragment needs an onDestroyView() override added:
override fun onDestroyView() {
super.onDestroyView()
_binding = null
}
corevibe555 commentedon Mar 31, 2026
Comment task follow up:
Branch name: technical/binding_resource_leaks
Set to null all bindings in onDestroyView() method: Done
Design Test plan:
Manual testing done, reached the fragments via manual testing:
SpaceMembersFragment Spaces → select a space → Members
SpacesListFragment Spaces tab
SetSpaceIconDialogFragment Spaces → edit space → set icon
CreateSpaceDialogFragment Spaces → create new space
AddMemberFragment Spaces → Members → Add member
RemoveFilesDialogFragment Select file(s) → Delete
MainEmptyListFragment Open an empty folder
CreateShortcutDialogFragment Create shortcut action
FileDetailsFragment Tap a file → file details
SharesFragment File details → Shares tab